Skip to content

Commit

Permalink
Conflict handling I.
Browse files Browse the repository at this point in the history
Signed-off-by: alex-z <[email protected]>
  • Loading branch information
allexzander committed May 14, 2024
1 parent b9f6151 commit 2e24c9c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/libsync/owncloudpropagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,17 @@ void OwncloudPropagator::startFilePropagation(const SyncFileItemPtr &item,
}
removedDirectory = item->_file + "/";
} else {
directories.top().second->appendTask(item);
const auto isVfsCfApi = syncOptions()._vfs && syncOptions()._vfs->mode() == Vfs::WindowsCfApi;
const auto isDownload = item->_direction == SyncFileItem::Down &&
(item->_instruction == CSYNC_INSTRUCTION_NEW || item->_instruction == CSYNC_INSTRUCTION_SYNC);
const auto isVirtualFile = item->_type == ItemTypeVirtualFile || item->_type == ItemTypeVirtualFileDehydration;
const auto shouldAddBulkPropagateDownloadItem = isDownload && isVirtualFile && isVfsCfApi && !directories.isEmpty();

if (shouldAddBulkPropagateDownloadItem) {
addBulkPropagateDownloadItem(item, directories);
} else {
directories.top().second->appendTask(item);
}
}

if (item->_instruction == CSYNC_INSTRUCTION_CONFLICT) {
Expand Down

0 comments on commit 2e24c9c

Please sign in to comment.