summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorxyz <xyz@queeq.com>2015-08-23 18:54:15 -0400
committerxyz <xyz@queeq.com>2015-08-23 18:54:15 -0400
commit88247e6857beb73666b7bc763bd897b26806dd9f (patch)
tree84b761cbb5ce636a6ea2cc58b5b23539b9c1f67e /lib/system
parent385a883e1425e511bb593332c0e53f72ab9146a1 (diff)
downloadNim-88247e6857beb73666b7bc763bd897b26806dd9f.tar.gz
Append the readAllBuffer to what was read already
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/sysio.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim
index edf3d347a..6db92ddf9 100644
--- a/lib/system/sysio.nim
+++ b/lib/system/sysio.nim
@@ -158,7 +158,7 @@ proc readAllFile(file: File, len: int): string =
   else:
     # We read all the bytes but did not reach the EOF
     # Try to read it as a buffer
-    result = readAllBuffer(file)
+    result.add(readAllBuffer(file))
 
 proc readAllFile(file: File): string =
   var len = rawFileSize(file)