Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fs: flip value of isOpen
  • Loading branch information
dexterleng committed Nov 16, 2018
commit d8b9808ae0481f26e1c6ffef7d03012084de34f6
4 changes: 2 additions & 2 deletions lib/internal/fs/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ ReadStream.prototype._read = function(n) {
};

ReadStream.prototype._destroy = function(err, cb) {
const isOpen = typeof this.fd !== 'number';
if (isOpen) {
const isOpen = typeof this.fd === 'number';
if (!isOpen) {
this.once('open', closeFsStream.bind(null, this, cb, err));
return;
}
Expand Down