fs: fix typo in fs.readFile of lying size=0 stat

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

View File

@ -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);