Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
fs: fix fs.readFileSync to work on real empty file
Browse files Browse the repository at this point in the history
  • Loading branch information
Shigeki Ohtsu authored and bnoordhuis committed Jun 12, 2012
1 parent 4eb2804 commit e3a2dd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fs.js
Expand Up @@ -223,7 +223,7 @@ fs.readFileSync = function(path, encoding) {
if (size !== 0) {
done = pos >= size;
} else {
done = bytesRead > 0;
done = bytesRead >= 0;
}
}

Expand Down

0 comments on commit e3a2dd1

Please sign in to comment.