[Commits] [SCM] claws branch, master, updated. 3.17.4-29-g2464379f0

paul at claws-mail.org paul at claws-mail.org
Tue Sep 24 16:07:03 CET 2019


The branch, master has been updated
       via  2464379f089cf522d0e68da09b34c8ff85aedd80 (commit)
      from  47e9a6a807ab30baae05f4557f82d63c70108a59 (commit)

Summary of changes:
 src/compose.c                           | 4 ++--
 src/mbox.c                              | 2 +-
 src/plugins/spamassassin/spamassassin.c | 2 +-
 src/procmsg.c                           | 7 ++++---
 src/procmsg.h                           | 3 ++-
 5 files changed, 10 insertions(+), 8 deletions(-)


- Log -----------------------------------------------------------------
commit 2464379f089cf522d0e68da09b34c8ff85aedd80
Author: Paul <paul at claws-mail.org>
Date:   Tue Sep 24 17:06:58 2019 +0100

    fix bug 4253, 'Claws metadata included in MBOX exports'

diff --git a/src/compose.c b/src/compose.c
index 75166b118..e129d6e26 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -2894,7 +2894,7 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo)
 
 	cm_return_val_if_fail(msginfo != NULL, -1);
 
-	if ((fp = procmsg_open_message(msginfo)) == NULL) return -1;
+	if ((fp = procmsg_open_message(msginfo, FALSE)) == NULL) return -1;
 	procheader_get_header_fields(fp, hentry);
 	claws_fclose(fp);
 
@@ -3019,7 +3019,7 @@ static gint compose_parse_manual_headers(Compose *compose, MsgInfo *msginfo, Hea
 
 	cm_return_val_if_fail(msginfo != NULL, -1);
 
-	if ((fp = procmsg_open_message(msginfo)) == NULL) return -1;
+	if ((fp = procmsg_open_message(msginfo, FALSE)) == NULL) return -1;
 	procheader_get_header_fields(fp, entries);
 	claws_fclose(fp);
 
diff --git a/src/mbox.c b/src/mbox.c
index 6375615a6..26fece154 100644
--- a/src/mbox.c
+++ b/src/mbox.c
@@ -568,7 +568,7 @@ gint export_list_to_mbox(GSList *mlist, const gchar *mbox)
 		gchar buft[BUFFSIZE];
 		msginfo = (MsgInfo *)cur->data;
 
-		msg_fp = procmsg_open_message(msginfo);
+		msg_fp = procmsg_open_message(msginfo, TRUE);
 		if (!msg_fp) {
 			continue;
 		}
diff --git a/src/plugins/spamassassin/spamassassin.c b/src/plugins/spamassassin/spamassassin.c
index e5a39b2e5..1c0cf4a42 100644
--- a/src/plugins/spamassassin/spamassassin.c
+++ b/src/plugins/spamassassin/spamassassin.c
@@ -228,7 +228,7 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
 	if (message_callback != NULL)
 		message_callback(_("SpamAssassin: filtering message..."));
 
-	if ((fp = procmsg_open_message(msginfo)) == NULL) {
+	if ((fp = procmsg_open_message(msginfo, FALSE)) == NULL) {
 		debug_print("failed to open message file\n");
 		return FALSE;
 	}
diff --git a/src/procmsg.c b/src/procmsg.c
index 62f608346..fee027da9 100644
--- a/src/procmsg.c
+++ b/src/procmsg.c
@@ -479,7 +479,7 @@ void procmsg_message_file_list_free(MsgInfoList *file_list)
 	g_slist_free(file_list);
 }
 
-FILE *procmsg_open_message(MsgInfo *msginfo)
+FILE *procmsg_open_message(MsgInfo *msginfo, gboolean skip_special_headers)
 {
 	FILE *fp;
 	gchar *file;
@@ -504,7 +504,8 @@ FILE *procmsg_open_message(MsgInfo *msginfo)
 
 	g_free(file);
 
-	if (MSG_IS_QUEUED(msginfo->flags) || MSG_IS_DRAFT(msginfo->flags)) {
+	if (MSG_IS_QUEUED(msginfo->flags) || MSG_IS_DRAFT(msginfo->flags) ||
+	    skip_special_headers == TRUE) {
 		gchar buf[BUFFSIZE];
 
 		while (claws_fgets(buf, sizeof(buf), fp) != NULL) {
@@ -578,7 +579,7 @@ void procmsg_get_filter_keyword(MsgInfo *msginfo, gchar **header, gchar **key,
 	case FILTER_BY_NONE:
 		return;
 	case FILTER_BY_AUTO:
-		if ((fp = procmsg_open_message(msginfo)) == NULL)
+		if ((fp = procmsg_open_message(msginfo, FALSE)) == NULL)
 			return;
 		procheader_get_header_fields(fp, hentry);
 		claws_fclose(fp);
diff --git a/src/procmsg.h b/src/procmsg.h
index 1dda93dd8..66cccb58e 100644
--- a/src/procmsg.h
+++ b/src/procmsg.h
@@ -316,7 +316,8 @@ gchar  *procmsg_get_message_file_full	(MsgInfo	*msginfo,
 					 gboolean	 get_body);
 GSList *procmsg_get_message_file_list	(MsgInfoList	*mlist);
 void	procmsg_message_file_list_free	(MsgInfoList	*file_list);
-FILE   *procmsg_open_message		(MsgInfo	*msginfo);
+FILE   *procmsg_open_message		(MsgInfo	*msginfo,
+					 gboolean	skip_special_headers);
 gboolean procmsg_msg_exist		(MsgInfo	*msginfo);
 
 void	procmsg_get_filter_keyword	(MsgInfo	  *msginfo,

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list