[Commits] [SCM] claws branch, master, updated. 3.17.8-3-gc2d89cc36

paul at claws-mail.org paul at claws-mail.org
Thu Oct 22 08:21:28 CEST 2020


The branch, master has been updated
       via  c2d89cc36a96bd2de18e8e1b5a8e63f7dd21ee1b (commit)
      from  a09178fd0a14f331bf4b2c48d6f97abd796ab597 (commit)

Summary of changes:
 src/filtering.c | 13 ++++++++++++-
 src/filtering.h |  5 +++--
 src/folder.c    |  7 ++++---
 3 files changed, 19 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit c2d89cc36a96bd2de18e8e1b5a8e63f7dd21ee1b
Author: Paul <paul at claws-mail.org>
Date:   Thu Oct 22 07:21:21 2020 +0100

    fix bug 4394, 'folder processing runs on startup even if all rules are disabled'

diff --git a/src/filtering.c b/src/filtering.c
index 9a3cd95a0..edd0f3a9c 100644
--- a/src/filtering.c
+++ b/src/filtering.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2015 Hiroyuki Yamamoto & The Claws Mail Team
+ * Copyright (C) 1999-2020 the Claws Mail Team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -790,6 +790,17 @@ static gboolean filtering_is_final_action(FilteringAction *filtering_action)
 	}
 }
 
+gboolean processing_enabled(GSList *filtering_list)
+{
+	GSList	*l;
+	for (l = filtering_list; l != NULL; l = g_slist_next(l)) {
+		FilteringProp * filtering = (FilteringProp *) l->data;
+		if (filtering->enabled)
+			return TRUE;
+	}
+	return FALSE;
+}
+
 static gboolean filter_msginfo(GSList * filtering_list, MsgInfo * info, PrefsAccount* ac_prefs)
 {
 	GSList	*l;
diff --git a/src/filtering.h b/src/filtering.h
index 3f8ef26ac..7da85b940 100644
--- a/src/filtering.h
+++ b/src/filtering.h
@@ -1,6 +1,6 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto & The Claws Mail Team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2020 the Claws Mail Team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -86,6 +86,7 @@ void filteringprop_free(FilteringProp *prop);
 FilteringProp * filteringprop_parse(gchar **str);
 
 void filter_msginfo_move_or_delete(GSList *filtering_list, MsgInfo *info);
+gboolean processing_enabled(GSList *filtering_list);
 gboolean filter_message_by_msginfo(GSList *flist, MsgInfo *info, PrefsAccount *ac_prefs,
 								   FilteringInvocationType context, gchar *extra_info);
 
diff --git a/src/folder.c b/src/folder.c
index b9a9c99f8..7f06d3342 100644
--- a/src/folder.c
+++ b/src/folder.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2016 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -4447,8 +4447,9 @@ void folder_item_apply_processing(FolderItem *item)
 
 	processing_list = item->prefs->processing;
 
-	if (!pre_global_processing && !processing_list
-	&&  !post_global_processing)
+	if (!processing_enabled(pre_global_processing) &&
+	    !processing_enabled(processing_list) &&
+	    !processing_enabled(post_global_processing))
 		return;
 
 	debug_print("processing %s\n", item->name);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list