diff --git a/modules/mdb/back/methods/mdbVersion/upload.js b/modules/mdb/back/methods/mdbVersion/upload.js index 3d54c0250..57df35ce7 100644 --- a/modules/mdb/back/methods/mdbVersion/upload.js +++ b/modules/mdb/back/methods/mdbVersion/upload.js @@ -88,17 +88,19 @@ 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); } catch (e) {} - await fs.symlink(destinationFile, destinationBranch); + 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); } }