Use faster walkDir on BSDs
This commit is contained in:
parent
34d87c105c
commit
5e8eaa5f97
1 changed files with 1 additions and 1 deletions
|
|
@ -1301,7 +1301,7 @@ iterator walkDir*(dir: string): tuple[kind: PathComponent, path: string] {.
|
||||||
y = dir / y
|
y = dir / y
|
||||||
var k = pcFile
|
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_UNKNOWN:
|
||||||
if x.d_type == DT_DIR: k = pcDir
|
if x.d_type == DT_DIR: k = pcDir
|
||||||
if x.d_type == DT_LNK: k = succ(k)
|
if x.d_type == DT_LNK: k = succ(k)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue