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

Commit

Permalink
Browse files Browse the repository at this point in the history
fs: fix typo in fs.readFile of lying size=0 stat
  • Loading branch information
Shigeki Ohtsu authored and bnoordhuis committed Jun 12, 2012
1 parent 517cea3 commit 4eb2804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fs.js
Expand Up @@ -167,7 +167,7 @@ fs.readFile = function(path, encoding_) {
fs.close(fd, function(er) {
if (size === 0) {
// collected the data into the buffers list.
buffer = Buffer.concat(buffer.length, pos);
buffer = Buffer.concat(buffers, pos);
}

if (encoding) buffer = buffer.toString(encoding);
Expand Down

0 comments on commit 4eb2804

Please sign in to comment.