Do not backup stopped apps

This commit is contained in:
Girish Ramakrishnan
2020-05-27 21:01:17 -07:00
parent 4a0a934a76
commit fca3f606d2
2 changed files with 6 additions and 0 deletions

View File

@@ -1027,6 +1027,10 @@ function backupBoxWithAppBackupIds(appBackupIds, tag, progressCallback, callback
function canBackupApp(app) {
// only backup apps that are installed or specific pending states
// stopped apps cannot be backed up because addons might be down (redis)
if (app.runState === apps.RSTATE_STOPPED) return false;
// we used to check the health here but that doesn't work for stopped apps. it's better to just fail
// and inform the user if the backup fails and the app addons have not been setup yet.
return app.installationState === apps.ISTATE_INSTALLED ||