From de03875b4df5cfb3681bf2b605c97c380f28ce97 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 28 Jun 2023 18:33:21 +0800 Subject: [PATCH] Check selective sync state directories that have been updated and now have differing size Signed-off-by: Claudio Cambra --- src/libsync/discovery.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 89c410e47f76..076591fad5d1 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -717,11 +717,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