]> granicus.if.org Git - mutt/commitdiff
Fix saving of attachments.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 18 Apr 2006 15:28:50 +0000 (15:28 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 18 Apr 2006 15:28:50 +0000 (15:28 +0000)
recvattach.c

index 63cd4c4c5c5a4ee3b931e2422f4393eba788434b..82e912659590d664c75acf2827a83f8af3b4c61b 100644 (file)
@@ -408,9 +408,6 @@ static int mutt_query_save_attachment (FILE *fp, BODY *body, HEADER *hdr, char *
   else
     buf[0] = 0;
 
-  /* Remove any paths or bad characters */
-  mutt_sanitize_filename (buf, 1);
-
   prompt = _("Save to file: ");
   while (prompt)
   {
@@ -487,10 +484,7 @@ void mutt_save_attachment_list (FILE *fp, int tag, BODY *top, HEADER *hdr, MUTTM
        {
          int append = 0;
 
-         strfcpy (buf, NONULL (top->filename), sizeof (buf));
-
-         /* Remove any paths or bad characters */
-         mutt_sanitize_filename (buf, 1);
+         strfcpy (buf, mutt_basename (NONULL (top->filename)), sizeof (buf));
 
          if (mutt_get_field (_("Save to file: "), buf, sizeof (buf),
                                    M_FILE | M_CLEAR) != 0 || !buf[0])