summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorClay Sweetser <clay.sweetser@gmail.com>2013-12-18 16:04:43 -0500
committerClay Sweetser <clay.sweetser@gmail.com>2013-12-18 16:04:43 -0500
commit9de92522a6418b3460cea786dc363177288e02e1 (patch)
tree720d051cff84f6ea90586cb74bb48885f9f03874 /lib/pure
parentc26e787e5dab153b35470ea88f71dbf373de51f7 (diff)
downloadNim-9de92522a6418b3460cea786dc363177288e02e1.tar.gz
Further fixes (stupid kdiff automerge)
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/os.nim5
1 files changed, 2 insertions, 3 deletions
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: "<errno.h>".}: 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: