Prechádzať zdrojové kódy

Fix critical bug in syncing folder

Neeraj Gupta 2 rokov pred
rodič
commit
e5615ac17b
1 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  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(