copyDirSyncRecursive: Preserve timestamps for copied directories.
This commit is contained in:
parent
13f486d867
commit
0efe3bf00d
1 changed files with 4 additions and 0 deletions
|
|
@ -304,6 +304,10 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) {
|
|||
fCopyFile(_path.join(sourceDir, files[i]), _path.join(newDirLocation, files[i]));
|
||||
}
|
||||
}
|
||||
|
||||
if (preserveTimestamps === true) {
|
||||
fs.utimesSync(newDirLocation, checkDir.atime, checkDir.mtime);
|
||||
}
|
||||
};
|
||||
|
||||
/* wrench.chmodSyncRecursive("directory", filemode);
|
||||
|
|
|
|||
Reference in a new issue