summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShigeki Ohtsu <ohtsu@iij.ad.jp>2012-06-12 16:01:03 +0900
committerBen Noordhuis <info@bnoordhuis.nl>2012-06-12 15:02:39 +0200
commite3a2dd1b13344a8347265ab0f46181de33b1b1ef (patch)
tree43a32251fb0f295ee4c57661c261747deed5212a /lib
parent4eb2804db9e3bbc06ebda6296620ce5bf6f7b02e (diff)
downloadnode-e3a2dd1b13344a8347265ab0f46181de33b1b1ef.tar.gz
fs: fix fs.readFileSync to work on real empty file
Diffstat (limited to 'lib')
-rw-r--r--lib/fs.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fs.js b/lib/fs.js
index aa0792b24..cedb9b161 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -223,7 +223,7 @@ fs.readFileSync = function(path, encoding) {
if (size !== 0) {
done = pos >= size;
} else {
- done = bytesRead > 0;
+ done = bytesRead >= 0;
}
}