commit a29676ed69c4ff8566ae4eb8ca7e650e40cda22b
parent 4836480cc6a001a7bc71c64b09ab587ca270289d
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Tue, 17 Apr 2018 21:17:34 +0200
Fix unwanted IMAP connections on startup caused by processing rules.
The culprit was a combination of folder_item_prefs_clear()
setting item->enable_processing to TRUE even though default
value should be FALSE, and initial_processing() not skipping
over root folders, which do not have this variable later set
to correct default value in xml_to_folder_item().
Closes bug #3993: Claws Mail connects to IMAP server when it should not
Diffstat:
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/folder_item_prefs.c b/src/folder_item_prefs.c
@@ -201,8 +201,8 @@ static FolderItemPrefs *folder_item_prefs_clear(FolderItemPrefs *prefs)
prefs->save_copy_to_folder = FALSE;
prefs->color = 0;
- prefs->enable_processing = TRUE;
- prefs->enable_processing_when_opening = TRUE;
+ prefs->enable_processing = FALSE;
+ prefs->enable_processing_when_opening = FALSE;
prefs->processing = NULL;
prefs->newmailcheck = TRUE;
diff --git a/src/main.c b/src/main.c
@@ -2096,8 +2096,7 @@ static void initial_processing(FolderItem *item, gpointer data)
: _("top level folder"));
g_free(buf);
-
- if (item->prefs->enable_processing) {
+ if (folder_item_parent(item) != NULL && item->prefs->enable_processing) {
item->processing_pending = TRUE;
folder_item_apply_processing(item);
item->processing_pending = FALSE;