From a312808e3893ae58827e112398c87d398a89ebaa Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sat, 11 Jul 2015 14:01:53 +0100 Subject: [PATCH] Do not use errno on Windows in the ``os`` module. --- lib/pure/os.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))