This fixes a regression introduced by 40b7302
40b7302
@ -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() {