Keep the app source archive with the app instance data dir

This commit is contained in:
Johannes Zellner
2026-01-27 12:06:40 +01:00
parent ef2a94c2c8
commit fd0d65b8ce
4 changed files with 57 additions and 20 deletions

View File

@@ -1486,6 +1486,11 @@ async function install(data, auditSource) {
const appId = crypto.randomUUID();
debug(`Installing app ${appId}`);
// if we have a sourceArchive rename it to appId to be picked up later in the apptask
if (data.sourceArchiveFilePath) {
if (!safe.fs.renameSync(data.sourceArchiveFilePath, `/tmp/${appId}.tar.gz`)) throw new BoxError(BoxError.FS_ERROR, 'Error moving source archive');
}
const app = {
accessRestriction,
operators,