summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-11-23 16:07:25 +0100
committerAraq <rumpf_a@web.de>2014-11-23 16:07:25 +0100
commit81f013dabbf487a223471bd0eebfb87d23bf9dad (patch)
tree338ddccb47ccd5aa8b2af42b232e9f7b8f3c058d /lib
parente1630dcc73f13023205d45cab7bcabc415766b66 (diff)
downloadNim-81f013dabbf487a223471bd0eebfb87d23bf9dad.tar.gz
fixes #642
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/os.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 3a6930654..b5eead91d 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -474,7 +474,11 @@ proc getCreationTime*(file: string): Time {.rtl, extern: "nos$1".} =
 proc fileNewer*(a, b: string): bool {.rtl, extern: "nos$1".} =
   ## Returns true if the file `a` is newer than file `b`, i.e. if `a`'s
   ## modification time is later than `b`'s.
-  result = getLastModificationTime(a) - getLastModificationTime(b) > 0
+  when defined(posix):
+    result = getLastModificationTime(a) - getLastModificationTime(b) >= 0
+    # Posix's resolution sucks so, we use '>=' for posix.
+  else:
+    result = getLastModificationTime(a) - getLastModificationTime(b) > 0
 
 proc getCurrentDir*(): string {.rtl, extern: "nos$1", tags: [].} =
   ## Returns the `current working directory`:idx:.