File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const { Buffer } = require('buffer');
2020const {
2121 copyObject,
2222 getOptions,
23- validatePath
23+ validatePath,
2424} = require ( 'internal/fs/utils' ) ;
2525const { Readable, Writable, finished } = require ( 'stream' ) ;
2626const { toPathIfFileURL } = require ( 'internal/url' ) ;
@@ -134,7 +134,7 @@ function ReadStream(path, options) {
134134
135135 // If fd has been set, validate, otherwise validate path.
136136 if ( this . fd != null ) {
137- validateInteger ( this . fd , 'fd' , 0 ) ;
137+ this . fd = getValidatedFd ( this . fd ) ;
138138 } else {
139139 validatePath ( this . path ) ;
140140 }
@@ -306,7 +306,7 @@ function WriteStream(path, options) {
306306
307307 // If fd has been set, validate, otherwise validate path.
308308 if ( this . fd != null ) {
309- validateInteger ( this . fd , 'fd' , 0 ) ;
309+ this . fd = getValidatedFd ( this . fd ) ;
310310 } else {
311311 validatePath ( this . path ) ;
312312 }
You can’t perform that action at this time.
0 commit comments