]> granicus.if.org Git - mutt/commitdiff
When postponing, encode descriptions before encrypting.
authorKevin McCarthy <kevin@8t8.us>
Thu, 20 Dec 2018 01:43:26 +0000 (17:43 -0800)
committerKevin McCarthy <kevin@8t8.us>
Thu, 20 Dec 2018 02:26:34 +0000 (18:26 -0800)
This matches the behavior of the normal send process.  I don't think
there is actually an issue here since nothing is sent, but it makes
sense to be consistent.

send.c

diff --git a/send.c b/send.c
index 2ce97676d32c680ecac36af8df784bad2ee64cb7..673f07487ac8b67bbf10f86e71dc130302b14762 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1327,10 +1327,11 @@ static int postpone_message (HEADER *msg, HEADER *cur, char *fcc, int flags)
   if (!Postponed)
     return -1;
 
-  /* postpone the message until later. */
   if (msg->content->next)
     msg->content = mutt_make_multipart (msg->content);
 
+  mutt_encode_descriptions (msg->content, 1);
+
   if (WithCrypto && option (OPTPOSTPONEENCRYPT) && (msg->security & ENCRYPT))
   {
     if ((WithCrypto & APPLICATION_PGP) && (msg->security & APPLICATION_PGP))
@@ -1353,12 +1354,15 @@ static int postpone_message (HEADER *msg, HEADER *cur, char *fcc, int flags)
           msg->security |= SIGN;
         FREE (&pgpkeylist);
         msg->content = mutt_remove_multipart (msg->content);
+        decode_descriptions (msg->content);
         return -1;
       }
 
       if (is_signed)
         msg->security |= SIGN;
       FREE (&pgpkeylist);
+
+      mutt_encode_descriptions (msg->content, 0);
     }
   }
 
@@ -1368,7 +1372,6 @@ static int postpone_message (HEADER *msg, HEADER *cur, char *fcc, int flags)
    */
   msg->read = 0; msg->old = 0;
 
-  mutt_encode_descriptions (msg->content, 1);
   mutt_prepare_envelope (msg->env, 0);
   mutt_env_to_intl (msg->env, NULL, NULL);     /* Handle bad IDNAs the next time. */