Skip to content

Commit

Permalink
fixup! fs: allow passing negative zero fd
Browse files Browse the repository at this point in the history
Co-authored-by: mscdex <mscdex@users.noreply.github.com>
  • Loading branch information
RaisinTen and mscdex authored Jan 30, 2021
1 parent e496cc0 commit 0e9d2b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/fs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ const getValidatedPath = hideStackFrames((fileURLOrPath, propName = 'path') => {

const getValidatedFd = hideStackFrames((fd, propName = 'fd') => {
if (ObjectIs(fd, -0)) {
fd = 0;
return 0;
}

validateInt32(fd, propName, 0);
Expand Down

0 comments on commit 0e9d2b8

Please sign in to comment.