Skip to content

Commit

Permalink
fs: fix options.end of fs.ReadStream()
Browse files Browse the repository at this point in the history
  • Loading branch information
陈刚 committed Jan 12, 2018
1 parent e8c491a commit 036b29b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2236,7 +2236,8 @@ function ReadStream(path, options) {
this.flags = options.flags === undefined ? 'r' : options.flags;
this.mode = options.mode === undefined ? 0o666 : options.mode;

this.start = options.start;
this.start = (typeof this.fd !== 'number' && options.start === undefined) ?
0 : options.start;
this.end = options.end;
this.autoClose = options.autoClose === undefined ? true : options.autoClose;
this.pos = undefined;
Expand Down

0 comments on commit 036b29b

Please sign in to comment.