Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <[email protected]>
  • Loading branch information
bcoe and aduh95 authored Jul 15, 2021
1 parent 9449851 commit 1af0c65
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/internal/fs/copy/copy-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const {
closeSync,
copyFileSync,
existsSync,
futimesSync,
lstatSync,
mkdirSync,
openSync,
Expand All @@ -45,6 +44,7 @@ const {
statSync,
symlinkSync,
unlinkSync,
utimesSync,
} = fs;
const path = require('path');
const {
Expand Down Expand Up @@ -251,11 +251,7 @@ function setDestTimestamps(src, dest) {
// because it is modified by the read(2) system call
// (See https://nodejs.org/api/fs.html#fs_stat_time_values)
const updatedSrcStat = statSync(src);
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
}

function utimesMillisSync(path, atime, mtime) {
return utimesSync(path, atime, mtime);
return utimesSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
}

function onDir(srcStat, destStat, src, dest, opts) {
Expand Down

0 comments on commit 1af0c65

Please sign in to comment.