Explorar o código

Fix critical bug in syncing folder

Neeraj Gupta %!s(int64=2) %!d(string=hai) anos
pai
achega
e5615ac17b
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      lib/services/remote_sync_service.dart

+ 5 - 1
lib/services/remote_sync_service.dart

@@ -279,10 +279,14 @@ class RemoteSyncService {
         localIDsToSync.removeAll(alreadyClaimedLocalIDs);
       }
 
-      if (localIDsToSync.isEmpty || deviceCollection.collectionID == -1) {
+      if (localIDsToSync.isEmpty) {
         continue;
       }
       await _createCollectionForDevicePath(deviceCollection);
+      if (deviceCollection.collectionID == -1) {
+        _logger.finest('DeviceCollection should not be -1 here');
+        continue;
+      }
 
       moreFilesMarkedForBackup = true;
       await _db.setCollectionIDForUnMappedLocalFiles(