From c81bb07e2594e28d6a68e603c498cb0385ccd26f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <daniel.vratil@kdab.com> Date: Mon, 2 Jan 2017 17:31:31 +0100 Subject: [PATCH 46/47] CollectionSync: relax condition on matching nodes by name When using hierarchical RIDs CollecitonSync can fallback to trying to match Collections by name if it can't find matching RID with the same parent. The fallback previously required the names to match and RID of the local Collection to be empty. This change removes the second part of the condition (empty RID) and makes the fallback to only match by name. If remote Collection changes RID but not name, then it can be because the collection has been re-created on the remote server between resource syncs, but then the changes in content are caught during item sync (e.g. UIDVALIDITY for IMAP, custom sync in maildir etc.) --- akonadi/collectionsync.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/akonadi/collectionsync.cpp b/akonadi/collectionsync.cpp index 1a9f760c4..d09c57695 100644 --- a/akonadi/collectionsync.cpp +++ b/akonadi/collectionsync.cpp @@ -222,8 +222,7 @@ public: } foreach (LocalNode *childNode, localParentNode->childNodes) { - // the restriction on empty RIDs can possibly removed, but for now I only understand the implication for this case - if (childNode->collection.name() == name && childNode->collection.remoteId().isEmpty()) { + if (childNode->collection.name() == name) { return childNode; } } -- 2.14.1