From: Michael Elkins Date: Fri, 4 Oct 2013 18:22:15 +0000 (+0000) Subject: When recalling a postponed message that does not have a x-mutt-fcc header X-Git-Tag: mutt-1-5-24-rel~123^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50312d223636e6d0e4b93259683e975654938e73;p=mutt When recalling a postponed message that does not have a x-mutt-fcc header field, generate a default FCC just as we do for new messages. If x-mutt-fcc is present but empty, we assume that means the user does not want a copy. closes #3653 --- diff --git a/mutt.h b/mutt.h index 06e3c8cd..dcd7dc5f 100644 --- a/mutt.h +++ b/mutt.h @@ -298,6 +298,7 @@ enum #define SENDMAILX (1<<6) #define SENDKEY (1<<7) #define SENDRESEND (1<<8) +#define SENDPOSTPONEDFCC (1<<9) /* used by mutt_get_postponed() to signal that the x-mutt-fcc header field was present */ /* flags to _mutt_select_file() */ #define M_SEL_BUFFY (1<<0) diff --git a/postpone.c b/postpone.c index 7ff98145..2ba019c9 100644 --- a/postpone.c +++ b/postpone.c @@ -329,6 +329,12 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size tmp->next = NULL; mutt_free_list (&tmp); tmp = next; + /* note that x-mutt-fcc was present. we do this because we want to add a + * default fcc if the header was missing, but preserve the request of the + * user to not make a copy if the header field is present, but empty. + * see http://dev.mutt.org/trac/ticket/3653 + */ + code |= SENDPOSTPONEDFCC; } else if ((WithCrypto & APPLICATION_PGP) && (mutt_strncmp ("Pgp:", tmp->data, 4) == 0 /* this is generated diff --git a/send.c b/send.c index c9a834c9..fce003c0 100644 --- a/send.c +++ b/send.c @@ -1516,7 +1516,7 @@ ci_send_message (int flags, /* send mode */ /* specify a default fcc. if we are in batchmode, only save a copy of * the message if the value of $copy is yes or ask-yes */ - if (!fcc[0] && !(flags & (SENDPOSTPONED)) && (!(flags & SENDBATCH) || (quadoption (OPT_COPY) & 0x1))) + if (!fcc[0] && !(flags & (SENDPOSTPONEDFCC)) && (!(flags & SENDBATCH) || (quadoption (OPT_COPY) & 0x1))) { /* set the default FCC */ if (!msg->env->from)