mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 07:13:27 +00:00
Use faster walkDir on BSDs
This commit is contained in:
@@ -1301,7 +1301,7 @@ iterator walkDir*(dir: string): tuple[kind: PathComponent, path: string] {.
|
||||
y = dir / y
|
||||
var k = pcFile
|
||||
|
||||
when defined(linux) or defined(macosx):
|
||||
when defined(linux) or defined(macosx) or defined(bsd):
|
||||
if x.d_type != DT_UNKNOWN:
|
||||
if x.d_type == DT_DIR: k = pcDir
|
||||
if x.d_type == DT_LNK: k = succ(k)
|
||||
|
||||
Reference in New Issue
Block a user