summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-11-05 22:54:52 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-11-05 22:54:52 +0100
commita644471b1218ea2ae9bfda83bb1fd78649ee68e7 (patch)
tree446dbe1162bcd10d5390fe0a39c01edbcf7a1ca4
parent162f5ddb7d73f6e5abf284ea1f6b1cc4f68307ab (diff)
downloadNim-a644471b1218ea2ae9bfda83bb1fd78649ee68e7.tar.gz
os.nim: posix copyFile showed a weird problem about buffer flushing; worked around via flushFile() call
-rw-r--r--lib/pure/os.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 8f8f36b80..f077e798a 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -613,6 +613,7 @@ proc copyFile*(source, dest: string) {.rtl, extern: "nos$1",
       if bytesread != bufSize: break
     dealloc(buf)
     close(s)
+    flushFile(d)
     close(d)
 
 proc moveFile*(source, dest: string) {.rtl, extern: "nos$1",