Skip to content

Commit

Permalink
fix: don't recurse into hidden directories when `includeHidden == fal…
Browse files Browse the repository at this point in the history
…se` (#14)

partially address issue #7 includeHidden
  • Loading branch information
timotheecour authored and haltcase committed Jul 7, 2018
1 parent de74aff commit b6de2fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/glob.nim
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ iterator walkGlobKinds* (
):
yield ((if relative: base / rel else: path).unixToNativePath, kind)

if isRec: stack.add(path)
if isRec and (includeHidden or not path.isHidden):
stack.add(path)
of pcFile, pcLinkToFile:
if path.isHidden and not includeHidden: continue
if rel.matches(matcher):
Expand Down

0 comments on commit b6de2fd

Please sign in to comment.