Commits

Thomas Roessler  committed 42564cc

Fix FCC-related SNAFU in the ci_send_message() spaghetti.

  • Participants
  • Parent commits 870329b
  • Branches HEAD
  • Tags mutt-0-96-2-slightly-post-release

Comments (0)

Files changed (1)

   FILE *tempfp = NULL;
   BODY *pbody;
   int i, killfrom = 0;
+  struct stat st;
+
 #ifdef _PGPPATH
   BODY *save_content = NULL;
   char *pgpkeylist = NULL;
   {
 main_loop:
 
+    mutt_pretty_mailbox (fcc);
     i = mutt_compose_menu (msg, fcc, sizeof (fcc), cur);
     if (i == -1)
     {
     goto main_loop;
   }
 
+  /* Do FCC checking before any real processing happens, so we 
+   * don't have to do too much clean-up work.
+   */
+  
+  mutt_expand_path (fcc, sizeof (fcc));
+  if (*fcc && mutt_strcmp ("/dev/null", fcc) != 0 &&
+      !option (OPTNOCURSES) && !(flags & SENDMAILX) &&
+      !mutt_save_confirm (fcc, &st))
+  {
+    mutt_clear_error ();
+    goto main_loop;
+  }
+
   if (msg->content->next)
     msg->content = mutt_make_multipart (msg->content);
 
   }
 #endif /* _PGPPATH */
 
+  /* the following check may _badly_ interact with the PGP code above. */
+  
+#if 0
   if (flags & SENDEDITMSG)
   {
    int really_send = mutt_yesorno (_("Message edited. Really send?"), 1);
    if (really_send != M_YES)
      goto main_loop;
   }
+#endif
+
 
   if (!option (OPTNOCURSES) && !(flags & SENDMAILX))
     mutt_message _("Sending message...");
   encode_descriptions (msg->content);
 
   /* save a copy of the message, if necessary. */
-  mutt_expand_path (fcc, sizeof (fcc));
+
   if (*fcc && mutt_strcmp ("/dev/null", fcc) != 0)
   {
-    struct stat st;
     BODY *tmpbody = msg->content;
 #ifdef _PGPPATH
     BODY *save_sig = NULL;
     BODY *save_parts = NULL;
 #endif /* _PGPPATH */
 
-    /* honor $confirmcreate and $confirmappend  in interactive mode */
-    if (!option (OPTNOCURSES) && !(flags & SENDMAILX) && 
-	!mutt_save_confirm (fcc, &st))
-    {
-      mutt_pretty_mailbox (fcc);
-      mutt_clear_error();
-      goto main_loop;
-    }
-
     /* check to see if the user wants copies of all attachments */
     if (!option (OPTFCCATTACH) && msg->content->type == TYPEMULTIPART)
     {