mirror of https://github.com/nodejs/node.git
fs: fix typo in fs.readFile of lying size=0 stat
parent
517cea3636
commit
4eb2804db9
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue