clone: read custom icon from downloaded backup
the backups table does not have icon to save space. only the archives table has it for the moment.
This commit is contained in:
@@ -366,6 +366,10 @@ async function install(app, args, progressCallback) {
|
||||
await services.setupAddons(app, app.manifest.addons);
|
||||
await services.clearAddons(app, app.manifest.addons);
|
||||
await backuptask.downloadApp(app, restoreConfig, (progress) => { progressCallback({ percent: 65, message: progress.message }); });
|
||||
if (app.installationState === apps.ISTATE_PENDING_CLONE) {
|
||||
const customIcon = safe.fs.readFileSync(path.join(paths.APPS_DATA_DIR, app.id + '/icon.png'));
|
||||
if (customIcon) await updateApp(app, { icon: customIcon });
|
||||
}
|
||||
await progressCallback({ percent: 70, message: 'Restoring addons' });
|
||||
await services.restoreAddons(app, app.manifest.addons);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user