fs: fix fs.readFileSync to work on real empty file

pull/24503/head
Shigeki Ohtsu 2012-06-12 16:01:03 +09:00 committed by Ben Noordhuis
parent 4eb2804db9
commit e3a2dd1b13
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ fs.readFileSync = function(path, encoding) {
if (size !== 0) { if (size !== 0) {
done = pos >= size; done = pos >= size;
} else { } else {
done = bytesRead > 0; done = bytesRead >= 0;
} }
} }