diff --git a/lib/internal/fs/streams.js b/lib/internal/fs/streams.js index 6447e5e580bddc..57afb06d1467ad 100644 --- a/lib/internal/fs/streams.js +++ b/lib/internal/fs/streams.js @@ -120,7 +120,7 @@ function close(stream, err, cb) { function importFd(stream, options) { stream.fd = null; - if (options.fd) { + if (options.fd != null) { if (typeof options.fd === 'number') { // When fd is a raw descriptor, we must keep our fingers crossed // that the descriptor won't get closed, or worse, replaced with