Skip to content

Commit da5fcd9

Browse files
committed
fixup! fs: improve error performance of linkSync
1 parent 7cecb6e commit da5fcd9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

benchmark/fs/bench-linkSync.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ const fs = require('fs');
55
const tmpdir = require('../../test/common/tmpdir');
66
tmpdir.refresh();
77

8+
// Calling `chmodSync` causes Windows build to fail.
9+
// Reference: https://github.com/libuv/libuv/issues/3267
10+
if (process.platform !== 'win32') {
11+
return;
12+
}
13+
814
const tmpfile = tmpdir.resolve('.bench-file-data');
915
fs.writeFileSync(tmpfile, 'bench-file', 'utf-8');
1016
fs.chmodSync(tmpfile, fs.constants.S_IRUSR);

0 commit comments

Comments
 (0)