mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-22 00:41:28 +00:00
Do not use errno on Windows in the `os` module.
This commit is contained in:
@@ -1019,7 +1019,7 @@ proc moveFile*(source, dest: string) {.rtl, extern: "nos$1",
|
||||
let d = newWideCString(dest)
|
||||
if moveFileW(s, d, 0'i32) == 0'i32: raiseOSError(osLastError())
|
||||
else:
|
||||
if moveFileA(source, dest, 0'i32) == 0'i32: raiseOSError(osLastError(),$strerror(errno))
|
||||
if moveFileA(source, dest, 0'i32) == 0'i32: raiseOSError(osLastError())
|
||||
else:
|
||||
if c_rename(source, dest) != 0'i32:
|
||||
raiseOSError(osLastError(), $strerror(errno))
|
||||
|
||||
Reference in New Issue
Block a user