Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Avoid repeated cleanup during backup preparation

laurenspriem76af1b3b04ff
diff --git a/mobile/apps/photos/changes/upload-preparation-cleanup.md b/mobile/apps/photos/changes/upload-preparation-cleanup.md
new file mode 100644
index 0000000000..fcf9f7e195
--- /dev/null
+++ b/mobile/apps/photos/changes/upload-preparation-cleanup.md
@@ -0,0 +1 @@
+- Reduced backup preparation work for libraries with many folders.
diff --git a/mobile/apps/photos/lib/services/sync/remote_sync_service.dart b/mobile/apps/photos/lib/services/sync/remote_sync_service.dart
index dc8d393e86..7d754e9b15 100644
--- a/mobile/apps/photos/lib/services/sync/remote_sync_service.dart
+++ b/mobile/apps/photos/lib/services/sync/remote_sync_service.dart
@@ -410,6 +410,7 @@ class RemoteSyncService {
if (alreadyClaimedLocalIDs.isNotEmpty && !_hasCleanupStaleEntry) {
try {
await _db.removeQueuedLocalFiles(alreadyClaimedLocalIDs, ownerID);
+ _hasCleanupStaleEntry = true;
} catch (e, s) {
_logger.severe("removeQueuedLocalFiles failed", e, s);
}