Browse Source

Fix critical bug in syncing folder

Neeraj Gupta 2 years ago
parent
commit
e5615ac17b
1 changed files with 5 additions and 1 deletions
  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);
         localIDsToSync.removeAll(alreadyClaimedLocalIDs);
       }
       }
 
 
-      if (localIDsToSync.isEmpty || deviceCollection.collectionID == -1) {
+      if (localIDsToSync.isEmpty) {
         continue;
         continue;
       }
       }
       await _createCollectionForDevicePath(deviceCollection);
       await _createCollectionForDevicePath(deviceCollection);
+      if (deviceCollection.collectionID == -1) {
+        _logger.finest('DeviceCollection should not be -1 here');
+        continue;
+      }
 
 
       moreFilesMarkedForBackup = true;
       moreFilesMarkedForBackup = true;
       await _db.setCollectionIDForUnMappedLocalFiles(
       await _db.setCollectionIDForUnMappedLocalFiles(