Skip to content

Commit

Permalink
feat: normalize returned paths to current os style
Browse files Browse the repository at this point in the history
  • Loading branch information
citycide committed Jul 4, 2018
1 parent 1753cb8 commit 966e8cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/glob.nim
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ iterator walkGlobKinds* (
matchPattern &= "/**"
else:
yield (
(if relative: matchPattern.toRelative(dir) else: matchPattern),
(if relative: matchPattern.toRelative(dir) else: matchPattern).unixToNativePath,
kind.get()
)

Expand Down Expand Up @@ -314,13 +314,13 @@ iterator walkGlobKinds* (
includeDirs and
(not path.isHidden or includeHidden)
):
yield ((if relative: base / rel else: path), kind)
yield ((if relative: base / rel else: path).unixToNativePath, kind)

if isRec: stack.add(path)
of pcFile, pcLinkToFile:
if path.isHidden and not includeHidden: continue
if rel.matches(matcher):
yield ((if relative: base / rel else: path), kind)
yield ((if relative: base / rel else: path).unixToNativePath, kind)

iterator walkGlob* (
pattern: string | Glob,
Expand Down

0 comments on commit 966e8cf

Please sign in to comment.