Blame SOURCES/evolution-data-server-3.22.7-imapx-subscriptions.patch

1e20f1
diff -up evolution-data-server-3.22.7/camel/providers/imapx/camel-imapx-store.c.imapx-subscriptions evolution-data-server-3.22.7/camel/providers/imapx/camel-imapx-store.c
1e20f1
--- evolution-data-server-3.22.7/camel/providers/imapx/camel-imapx-store.c.imapx-subscriptions	2017-04-12 15:10:11.507183207 +0200
1e20f1
+++ evolution-data-server-3.22.7/camel/providers/imapx/camel-imapx-store.c	2017-04-12 15:12:39.367181163 +0200
1e20f1
@@ -1449,14 +1449,21 @@ imapx_store_remove_unknown_mailboxes_cb
1e20f1
 	g_return_val_if_fail (CAMEL_IS_IMAPX_STORE (imapx_store), FALSE);
1e20f1
 
1e20f1
 	if (camel_imapx_mailbox_get_state (mailbox) == CAMEL_IMAPX_MAILBOX_STATE_CREATED) {
1e20f1
+		CamelSettings *settings;
1e20f1
 		CamelFolderInfo *fi;
1e20f1
 		gchar *folder_path;
1e20f1
+		gboolean use_subscriptions;
1e20f1
+
1e20f1
+		settings = camel_service_ref_settings (CAMEL_SERVICE (imapx_store));
1e20f1
+		use_subscriptions = camel_imapx_settings_get_use_subscriptions (CAMEL_IMAPX_SETTINGS (settings));
1e20f1
+		g_object_unref (settings);
1e20f1
 
1e20f1
 		folder_path = camel_imapx_mailbox_dup_folder_path (mailbox);
1e20f1
 		fi = imapx_store_build_folder_info (imapx_store, folder_path,
1e20f1
 			(CamelFolderInfoFlags) imapx_store_mailbox_attributes_to_flags (mailbox));
1e20f1
 		camel_store_folder_created (CAMEL_STORE (imapx_store), fi);
1e20f1
-		camel_subscribable_folder_subscribed (CAMEL_SUBSCRIBABLE (imapx_store), fi);
1e20f1
+		if ((fi->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) != 0 || !use_subscriptions)
1e20f1
+			camel_subscribable_folder_subscribed (CAMEL_SUBSCRIBABLE (imapx_store), fi);
1e20f1
 		camel_folder_info_free (fi);
1e20f1
 		g_free (folder_path);
1e20f1
 	}