Browse Source

fs.readFile: Emit 'close' if we don't expect a close later

This fixes a regression introduced by 40b7302
v0.8.7-release
isaacs 13 years ago
parent
commit
45b772d8cb
  1. 3
      lib/fs.js

3
lib/fs.js

@ -88,6 +88,9 @@ fs.readFile = function(path, encoding_) {
readStream.on('error', function(er) {
error = er;
readStream.destroy();
if (!readStream.fd) {
readStream.emit('close');
}
});
readStream.on('close', function() {

Loading…
Cancel
Save