if ((flags & CH_UPDATE_IRT) &&
ascii_strncasecmp ("In-Reply-To:", buf, 12) == 0)
continue;
- if (flags & CH_UPDATE_LABEL &&
+ if ((flags & CH_UPDATE_LABEL) &&
ascii_strncasecmp ("X-Label:", buf, 8) == 0)
continue;
if ((flags & CH_UPDATE_IRT) &&
ascii_strncasecmp ("In-Reply-To:", buf, 12) == 0)
continue;
+ if ((flags & CH_UPDATE_LABEL) &&
+ ascii_strncasecmp ("X-Label:", buf, 8) == 0)
+ continue;
/* Find x -- the array entry where this header is to be saved */
if (flags & CH_REORDER)
fprintf (out, "Lines: %d\n", h->lines);
}
- if (flags & CH_UPDATE_LABEL)
+ if ((flags & CH_UPDATE_LABEL) && h->env->x_label)
{
- h->xlabel_changed = 0;
- if (h->env->x_label != NULL)
- if (fprintf(out, "X-Label: %s\n", h->env->x_label) !=
- 10 + strlen(h->env->x_label))
- return -1;
+ if (!(flags & CH_DECODE))
+ rfc2047_encode_string (&h->env->x_label);
+ if (mutt_write_one_header (out, "X-Label", h->env->x_label,
+ flags & CH_PREFIX ? prefix : 0,
+ mutt_window_wrap_cols (MuttIndexWindow, Wrap),
+ flags) == -1)
+ return -1;
+ if (!(flags & CH_DECODE))
+ rfc2047_decode (&h->env->x_label);
}
if ((flags & CH_NONEWLINE) == 0)