From a2ecf2a77a38025442da8150156e5b59f107b897 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 4 May 2017 07:53:36 +0200 Subject: Only sync subscribed folders --- examples/imapresource/imapresource.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples/imapresource/imapresource.cpp') diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index 8577b8c..8e6d2b1 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp @@ -584,6 +584,10 @@ public: //Synchronize folders return KAsync::value(folders) .serialEach([=](const Folder &folder) { + //Skip unsubscribed folders + if (!folder.subscribed) { + return KAsync::null(); + } SinkLog() << "Syncing folder " << folder.path(); //Emit notification that the folder is being synced. //The synchronizer can't do that because it has no concept of the folder filter on a mail sync scope meaning that the folder is being synchronized. -- cgit v1.2.3