From: Thomas Roessler Date: Tue, 18 Apr 2006 15:28:50 +0000 (+0000) Subject: Fix saving of attachments. X-Git-Tag: mutt-1-5-12-rel~109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b3161fa24ff74d271ad7627c94beb4f3df7bc7b;p=mutt Fix saving of attachments. --- diff --git a/recvattach.c b/recvattach.c index 63cd4c4c..82e91265 100644 --- a/recvattach.c +++ b/recvattach.c @@ -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])