Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b4f8c51

Browse files
committedSep 25, 2023
fixup! fs: improve error perf of sync chmod+fchmod
1 parent 3437408 commit b4f8c51

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed
 

‎benchmark/fs/bench-fchmodSync.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ function main({ n, type }) {
3131
new Error('Invalid type');
3232
}
3333

34-
const fds = files.map(x => {
35-
// try to open, if not return invalid fd (-1)
34+
const fds = files.map((x) => {
35+
// Try to open, if not return invalid fd (-1)
3636
try {
3737
return fs.openSync(x, 'r');
3838
} catch {

‎src/node_file.cc

-1
Original file line numberDiff line numberDiff line change
@@ -2697,7 +2697,6 @@ static void ChmodSync(const FunctionCallbackInfo<Value>& args) {
26972697
}
26982698
}
26992699

2700-
27012700
/* fs.fchmod(fd, mode);
27022701
* Wrapper for fchmod(1) / EIO_FCHMOD
27032702
*/

0 commit comments

Comments
 (0)
Please sign in to comment.