fs: fix typo in fs.readFile of lying size=0 stat
This commit is contained in:
parent
517cea3636
commit
4eb2804db9
@ -167,7 +167,7 @@ fs.readFile = function(path, encoding_) {
|
|||||||
fs.close(fd, function(er) {
|
fs.close(fd, function(er) {
|
||||||
if (size === 0) {
|
if (size === 0) {
|
||||||
// collected the data into the buffers list.
|
// collected the data into the buffers list.
|
||||||
buffer = Buffer.concat(buffer.length, pos);
|
buffer = Buffer.concat(buffers, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encoding) buffer = buffer.toString(encoding);
|
if (encoding) buffer = buffer.toString(encoding);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user