From 6054e0bef36494369f8056757ed5e84118f76676 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 5 Aug 2022 13:24:48 +0200 Subject: [PATCH 1/2] fix(mdb): use relative path --- modules/mdb/back/methods/mdbVersion/upload.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/mdb/back/methods/mdbVersion/upload.js b/modules/mdb/back/methods/mdbVersion/upload.js index 3d54c0250..cef0be6d0 100644 --- a/modules/mdb/back/methods/mdbVersion/upload.js +++ b/modules/mdb/back/methods/mdbVersion/upload.js @@ -89,10 +89,11 @@ module.exports = Self => { const destinationBranch = path.join(branchPath, `${appName}.7z`); const destinationRoot = path.join(accessContainer.client.root, `${appName}.7z`); + const destinationRelative = `../../.archive/${appName}/${newVersion}.7z`; try { await fs.unlink(destinationBranch); } catch (e) {} - await fs.symlink(destinationFile, destinationBranch); + await fs.symlink(destinationRelative, destinationBranch); if (branch == 'master') { try { From d2b901d47f5e3d24ac2a63a8e847784aded21078 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 9 Aug 2022 11:49:28 +0200 Subject: [PATCH 2/2] Relative path for master versions --- modules/mdb/back/methods/mdbVersion/upload.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/mdb/back/methods/mdbVersion/upload.js b/modules/mdb/back/methods/mdbVersion/upload.js index cef0be6d0..57df35ce7 100644 --- a/modules/mdb/back/methods/mdbVersion/upload.js +++ b/modules/mdb/back/methods/mdbVersion/upload.js @@ -88,7 +88,6 @@ module.exports = Self => { await fs.mkdir(branchPath, {recursive: true}); const destinationBranch = path.join(branchPath, `${appName}.7z`); - const destinationRoot = path.join(accessContainer.client.root, `${appName}.7z`); const destinationRelative = `../../.archive/${appName}/${newVersion}.7z`; try { await fs.unlink(destinationBranch); @@ -96,10 +95,12 @@ module.exports = Self => { await fs.symlink(destinationRelative, destinationBranch); if (branch == 'master') { + const destinationRoot = path.join(accessContainer.client.root, `${appName}.7z`); + const rootRelative = `./.archive/${appName}/${newVersion}.7z`; try { await fs.unlink(destinationRoot); } catch (e) {} - await fs.symlink(destinationFile, destinationRoot); + await fs.symlink(rootRelative, destinationRoot); } }