Skip to content

Commit

Permalink
test: do not open fixture files for writing
Browse files Browse the repository at this point in the history
test-fs-fsync makes a copy of a fixture file, but then doesn't do
anything with it and instead operates on the original fixture file. This
appears to be in error, and this change fixes that.

PR-URL: nodejs#17808
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott committed Dec 22, 2017
1 parent ab5a2ab commit 92fc14a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-fs-fsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const fileTemp = path.join(common.tmpDir, 'a.js');
common.refreshTmpDir();
fs.copyFileSync(fileFixture, fileTemp);

fs.open(fileFixture, 'a', 0o777, common.mustCall(function(err, fd) {
fs.open(fileTemp, 'a', 0o777, common.mustCall(function(err, fd) {
assert.ifError(err);

fs.fdatasyncSync(fd);
Expand Down

0 comments on commit 92fc14a

Please sign in to comment.