diff --git a/lib/pure/os.nim b/lib/pure/os.nim index eb7aaa6a68..1739718f6f 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -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))