From 860733d2385cab71211c3e441c78261ba4cf7494 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Tue, 7 May 2024 15:38:47 -0300 Subject: [PATCH] Don't retry backup on removable storage --- .../java/com/stevesoltys/seedvault/worker/AppBackupWorker.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/stevesoltys/seedvault/worker/AppBackupWorker.kt b/app/src/main/java/com/stevesoltys/seedvault/worker/AppBackupWorker.kt index e47e7e84..e1a7426f 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/worker/AppBackupWorker.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/worker/AppBackupWorker.kt @@ -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