From 4eb2804db9e3bbc06ebda6296620ce5bf6f7b02e Mon Sep 17 00:00:00 2001 From: Shigeki Ohtsu Date: Tue, 12 Jun 2012 15:01:34 +0900 Subject: [PATCH] fs: fix typo in fs.readFile of lying size=0 stat --- lib/fs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fs.js b/lib/fs.js index 6f8e3b73650..aa0792b24b5 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -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);