Remove additionalInfo in OSError in findNextFile
This commit is contained in:
parent
c9c44a4eb9
commit
8da96bc72b
1 changed files with 2 additions and 2 deletions
|
|
@ -675,7 +675,7 @@ template walkCommon(pattern: string, filter) =
|
|||
if findNextFile(res, f) == 0'i32:
|
||||
let errCode = getLastError()
|
||||
if errCode == ERROR_NO_MORE_FILES: break
|
||||
else: raiseOSError(errCode.OSErrorCode, "findNextFile failed")
|
||||
else: raiseOSError(errCode.OSErrorCode)
|
||||
else: # here we use glob
|
||||
var
|
||||
f: Glob
|
||||
|
|
@ -788,7 +788,7 @@ iterator walkDir*(dir: string; relative=false): tuple[kind: PathComponent, path:
|
|||
if findNextFile(h, f) == 0'i32:
|
||||
let errCode = getLastError()
|
||||
if errCode == ERROR_NO_MORE_FILES: break
|
||||
else: raiseOSError(errCode.OSErrorCode, "findNextFile failed")
|
||||
else: raiseOSError(errCode.OSErrorCode)
|
||||
else:
|
||||
var d = opendir(dir)
|
||||
if d != nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue