Skip to content

Commit

Permalink
Check selective sync state directories that have been updated and now…
Browse files Browse the repository at this point in the history
… have differing size

Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Jun 28, 2023
1 parent 92ebb5b commit de03875
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de03875

Please sign in to comment.