summaryrefslogtreecommitdiffstats
path: root/copy.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2018-12-25 19:52:53 -0800
committerKevin McCarthy <kevin@8t8.us>2018-12-29 14:12:07 -0800
commit2817372ffb68c46f68d14d844b913204f9c7dccc (patch)
tree96a8ba192a51f0aae3966bc531ebdeea4e4fc506 /copy.c
parent7f603dd66a28d0c02c09bbd6636fc659e69b480d (diff)
Change x-label editing flag to be in the envelope.
Handle like In-Reply-To and References editing. Change the flag setting to be inside mutt_copy_header(). The resetting of the changed flag occurs explicitly in the imap and maildir/mh sync_mailbox code. It occurs for mbox in the mx_update_tables() call in mx_sync_mailbox().
Diffstat (limited to 'copy.c')
-rw-r--r--copy.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/copy.c b/copy.c
index b120ff0a..fa1240ab 100644
--- a/copy.c
+++ b/copy.c
@@ -342,6 +342,7 @@ mutt_copy_hdr (FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end, int flags,
CH_NOQFROM ignore ">From " line
CH_UPDATE_IRT update the In-Reply-To: header
CH_UPDATE_REFS update the References: header
+ CH_UPDATE_LABEL update the X-Label: header
prefix
string to use if CH_PREFIX is set
@@ -355,7 +356,8 @@ mutt_copy_header (FILE *in, HEADER *h, FILE *out, int flags, const char *prefix)
if (h->env)
flags |= ((h->env->changed & MUTT_ENV_CHANGED_IRT) ? CH_UPDATE_IRT : 0)
- | ((h->env->changed & MUTT_ENV_CHANGED_REFS) ? CH_UPDATE_REFS : 0);
+ | ((h->env->changed & MUTT_ENV_CHANGED_REFS) ? CH_UPDATE_REFS : 0)
+ | ((h->env->changed & MUTT_ENV_CHANGED_XLABEL) ? CH_UPDATE_LABEL : 0);
if (mutt_copy_hdr (in, out, h->offset, h->content->offset, flags, prefix) == -1)
return -1;
@@ -424,7 +426,6 @@ mutt_copy_header (FILE *in, HEADER *h, FILE *out, int flags, const char *prefix)
if ((flags & CH_UPDATE_LABEL) && h->env->x_label)
{
- h->xlabel_changed = 0;
temp_hdr = h->env->x_label;
/* env->x_label isn't currently stored with direct references
* elsewhere. Context->label_hash strdups the keys. But to be
@@ -523,9 +524,6 @@ _mutt_copy_message (FILE *fpout, FILE *fpin, HEADER *hdr, BODY *body,
_mutt_make_string (prefix, sizeof (prefix), NONULL (Prefix), Context, hdr, 0);
}
- if (hdr->xlabel_changed)
- chflags |= CH_UPDATE_LABEL;
-
if ((flags & MUTT_CM_NOHEADER) == 0)
{
if (flags & MUTT_CM_PREFIX)