Skip to content

Commit

Permalink
fixup! fs: improve error perf of sync chmod+fchmod
Browse files Browse the repository at this point in the history
  • Loading branch information
CanadaHonk committed Sep 25, 2023
1 parent e14d970 commit 38b5870
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions benchmark/fs/bench-fchmodSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function main({ n, type }) {
new Error('Invalid type');
}

const fds = files.map(x => {
// try to open, if not return invalid fd (-1)
const fds = files.map((x) => {
// Try to open, if not return invalid fd (-1)
try {
return fs.openSync(x, 'r');
} catch {
Expand Down
1 change: 0 additions & 1 deletion src/node_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2697,7 +2697,6 @@ static void ChmodSync(const FunctionCallbackInfo<Value>& args) {
}
}


/* fs.fchmod(fd, mode);
* Wrapper for fchmod(1) / EIO_FCHMOD
*/
Expand Down

0 comments on commit 38b5870

Please sign in to comment.