Don't retry backup on removable storage

This commit is contained in:
Torsten Grote 2024-05-07 15:38:47 -03:00 committed by Chirayu Desai
parent 49262682d1
commit 860733d238

View file

@ -120,7 +120,10 @@ class AppBackupWorker(
if (isStopped) {
Result.retry()
} else {
doBackup()
val result = doBackup()
// only allow retrying if rescheduling is allowed
if (tags.contains(TAG_RESCHEDULE)) return result
else Result.success()
}
} finally {
// schedule next backup, because the old one gets lost