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

Commit

Permalink
Merge pull request #2701 from makandre/hotfix_11
Browse files Browse the repository at this point in the history
0.11.0: preserve only in upload end
  • Loading branch information
hhellyer committed Apr 17, 2020
2 parents 670a233 + ecd7708 commit 1d91a8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pfe/portal/modules/utils/sharedFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ module.exports.updateObject = function updateObject(objectToUpdate, fieldsToAddT
return objectToUpdate;
}

module.exports.copyProject = async function copyFile(fromProjectPath, toProjectPath, mode) {
module.exports.copyProject = async function copyFile(fromProjectPath, toProjectPath, mode, preserve = false) {
log.debug(`copyProject fromPath: ${fromProjectPath}, toPath: ${toProjectPath}`);
await fs.copy(fromProjectPath, toProjectPath, { preserveTimestamps: true });
await fs.copy(fromProjectPath, toProjectPath, { preserveTimestamps: preserve });
if (mode) {
await fs.chmod(toProjectPath, mode);
}
Expand Down
2 changes: 1 addition & 1 deletion src/pfe/portal/routes/projects/remoteBind.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ async function uploadEnd(req, res) {
|| modifiedList.length > 0;
if (wasProjectChanged) {
const projectPath = project.projectPath();
await cwUtils.copyProject(pathToTempProj, projectPath, getMode(project));
await cwUtils.copyProject(pathToTempProj, projectPath, getMode(project), true);

if (project.injectMetrics) {
try {
Expand Down

0 comments on commit 1d91a8c

Please sign in to comment.