]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Check selective sync state directories that have been updated and now have differing...
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 28 Jun 2023 10:33:21 +0000 (18:33 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 4 Aug 2023 09:40:36 +0000 (17:40 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/libsync/discovery.cpp

index a17b86e5ab6ef625056f7255ce97a739206f9bae..16b2b12c5a245f75a7ad036d15e924e14965ee1d 100644 (file)
@@ -718,11 +718,19 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(const SyncFileItemPtr &it
             item->_instruction = CSYNC_INSTRUCTION_SYNC;
             item->_type = ItemTypeVirtualFileDownload;
         } else if (dbEntry._etag != serverEntry.etag) {
+            const auto differingSize = sizeOnServer != item->_size;
+
             item->_direction = SyncFileItem::Down;
             item->_modtime = serverEntry.modtime;
             item->_size = sizeOnServer;
+
             if (serverEntry.isDirectory) {
                 ENFORCE(dbEntry.isDirectory());
+
+                if (differingSize) {
+                    _discoveryData->checkSelectiveSyncExistingFolder(path._server, serverEntry.remotePerm, sizeOnServer);
+                }
+
                 item->_instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
             } else if (!localEntry.isValid() && _queryLocal != ParentNotChanged) {
                 // Deleted locally, changed on server