backups: fix restore code path after backup id changes
This commit is contained in:
+2
-2
@@ -328,7 +328,7 @@ async function install(app, args, progressCallback) {
|
||||
}
|
||||
await services.teardownAddons(app, addonsToRemove);
|
||||
|
||||
if (!restoreConfig || restoreConfig.backupId) { // in-place import should not delete data dir
|
||||
if (!restoreConfig || restoreConfig.remotePath) { // in-place import should not delete data dir
|
||||
await deleteAppDir(app, { removeDirectory: false }); // do not remove any symlinked appdata dir
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ async function install(app, args, progressCallback) {
|
||||
if (!restoreConfig) { // install
|
||||
await progressCallback({ percent: 60, message: 'Setting up addons' });
|
||||
await services.setupAddons(app, app.manifest.addons);
|
||||
} else if (app.installationState === apps.ISTATE_PENDING_IMPORT && !restoreConfig.backupId) { // in-place import
|
||||
} else if (app.installationState === apps.ISTATE_PENDING_IMPORT && !restoreConfig.remotePath) { // in-place import
|
||||
await progressCallback({ percent: 60, message: 'Importing addons in-place' });
|
||||
await services.setupAddons(app, app.manifest.addons);
|
||||
await services.clearAddons(app, _.omit(app.manifest.addons, 'localstorage'));
|
||||
|
||||
Reference in New Issue
Block a user