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
Prev Previous commit
Next Next commit
fixup! fs: change default value of position in read and readSync
  • Loading branch information
RaisinTen committed Apr 1, 2021
commit 44dfe5ddbd201f5fb2092a4af86f38ea6290bdd0
2 changes: 1 addition & 1 deletion lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ function tryReadSync(fd, isUserFd, buffer, pos, len) {
let threw = true;
let bytesRead;
try {
bytesRead = fs.readSync(fd, buffer, pos, len);
bytesRead = fs.readSync(fd, buffer, pos, len, -1);
threw = false;
} finally {
if (threw && !isUserFd) fs.closeSync(fd);
Expand Down