Commit 5f67eab0 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

[Kolab] Fix Configuration folder discovery

When the Configuration mailbox is not in the top-level folder,
the Akonadi::CollectionFetchJob will return not just the Configuration
Collection but also its parents, which then leads to the Kolab
resource trying to sync tags from e.g. INBOX instead of the actual
Configuration folder.
parent 3cc31a86
......@@ -67,6 +67,10 @@ void KolabRelationResourceTask::onCollectionFetchResult(KJob *job)
Q_ASSERT(fetchJob != 0);
Q_FOREACH (const Akonadi::Collection &collection, fetchJob->collections()) {
if (!collection.contentMimeTypes().contains(KolabHelpers::getMimeType(Kolab::ConfigurationType))) {
// Skip parents of the actual Configuration folder
continue;
}
const QString mailBox = mailBoxForCollection(collection);
if (!mailBox.isEmpty()) {
mRelationCollection = collection;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment