Skip to content

Commit

Permalink
fixup! fs: improve error performance of linkSync
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Oct 1, 2023
1 parent af44ab8 commit faf02c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions benchmark/fs/bench-linkSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ const fs = require('fs');
const tmpdir = require('../../test/common/tmpdir');
tmpdir.refresh();

// Calling `chmodSync` causes Windows build to fail.
// Reference: https://github.com/libuv/libuv/issues/3267
if (process.platform !== 'win32') {
return;
}

const tmpfile = tmpdir.resolve('.bench-file-data');
fs.writeFileSync(tmpfile, 'bench-file', 'utf-8');
fs.chmodSync(tmpfile, fs.constants.S_IRUSR);
Expand Down

0 comments on commit faf02c5

Please sign in to comment.