Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit ecd7708

Browse files
committed
preserve only in upload end
Signed-off-by: Andrew Mak <[email protected]>
1 parent 670a233 commit ecd7708

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/pfe/portal/modules/utils/sharedFunctions.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ module.exports.updateObject = function updateObject(objectToUpdate, fieldsToAddT
8585
return objectToUpdate;
8686
}
8787

88-
module.exports.copyProject = async function copyFile(fromProjectPath, toProjectPath, mode) {
88+
module.exports.copyProject = async function copyFile(fromProjectPath, toProjectPath, mode, preserve = false) {
8989
log.debug(`copyProject fromPath: ${fromProjectPath}, toPath: ${toProjectPath}`);
90-
await fs.copy(fromProjectPath, toProjectPath, { preserveTimestamps: true });
90+
await fs.copy(fromProjectPath, toProjectPath, { preserveTimestamps: preserve });
9191
if (mode) {
9292
await fs.chmod(toProjectPath, mode);
9393
}

src/pfe/portal/routes/projects/remoteBind.route.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ async function uploadEnd(req, res) {
266266
|| modifiedList.length > 0;
267267
if (wasProjectChanged) {
268268
const projectPath = project.projectPath();
269-
await cwUtils.copyProject(pathToTempProj, projectPath, getMode(project));
269+
await cwUtils.copyProject(pathToTempProj, projectPath, getMode(project), true);
270270

271271
if (project.injectMetrics) {
272272
try {

0 commit comments

Comments
 (0)