From 9de92522a6418b3460cea786dc363177288e02e1 Mon Sep 17 00:00:00 2001 From: Clay Sweetser Date: Wed, 18 Dec 2013 16:04:43 -0500 Subject: Further fixes (stupid kdiff automerge) --- lib/pure/os.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/pure') diff --git a/lib/pure/os.nim b/lib/pure/os.nim index a366a7965..d74cb1fb9 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -970,7 +970,7 @@ proc moveFile*(source, dest: string) {.rtl, extern: "nos$1", if crename(source, dest) != 0'i32: raise newException(EOS, $strerror(errno)) -when not defined(ENOENT): +when not defined(ENOENT) and not defined(Windows): var ENOENT {.importc, header: "".}: cint when defined(Windows): @@ -987,8 +987,7 @@ proc removeFile*(file: string) {.rtl, extern: "nos$1", tags: [FWriteDir].} = ## Removes the `file`. If this fails, `EOS` is raised. This does not fail ## if the file never existed in the first place. ## On Windows, ignores the read-only attribute. - if cremove(file) != 0'i32 and errno != ENOENT: - when defined(Windows): + when defined(Windows): when useWinUnicode: let f = newWideCString(file) else: -- cgit 1.4.1-2-gfad0 ary refs log blame commit diff stats