From: Claudio Cambra Date: Wed, 28 Jun 2023 10:33:21 +0000 (+0800) Subject: Check selective sync state directories that have been updated and now have differing... X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~92^2^2~57^2~51 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5844b2763d03c3b29c6e074a3e6dbe0dc627ace9;p=nextcloud-desktop.git Check selective sync state directories that have been updated and now have differing size Signed-off-by: Claudio Cambra --- diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index a17b86e5a..16b2b12c5 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -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