Skip to content

Commit

Permalink
Add dir to raiseOSError in os.walkDir
Browse files Browse the repository at this point in the history
  • Loading branch information
demotomohiro committed Jan 10, 2020
1 parent 7701260 commit b2f8bde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pure/os.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,7 @@ iterator walkDir*(dir: string;
if errCode == ERROR_NO_MORE_FILES: break
else: raiseOSError(errCode.OSErrorCode)
elif checkError:
raiseOSError(osLastError())
raiseOSError(osLastError(), dir)
else:
var d = opendir(dir)
if d != nil:
Expand Down Expand Up @@ -2063,7 +2063,7 @@ iterator walkDir*(dir: string;
k = getSymlinkFileKind(path)
yield (k, y)
elif checkError:
raiseOSError(osLastError())
raiseOSError(osLastError(), dir)

iterator walkDirRec*(dir: string,
yieldFilter = {pcFile}, followFilter = {pcDir},
Expand Down

0 comments on commit b2f8bde

Please sign in to comment.