X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=attach.c;h=a644784ad02b27ffe7a987547b0d801c30fe8d99;hp=33eacb12056d0abf240f6a32a9a807289d67c050;hb=fa2fd1900f206da4bb975b5ece50ee29f5bd8a75;hpb=ba5e3af4ea19e1d20c80941c077039871ec84258 diff --git a/attach.c b/attach.c index 33eacb1..a644784 100644 --- a/attach.c +++ b/attach.c @@ -13,6 +13,9 @@ #endif #include "mutt.h" +#include "ascii.h" +#include "handler.h" +#include "recvattach.h" #include "mutt_menu.h" #include "mutt_curses.h" #include "keymap.h" @@ -245,7 +248,7 @@ int mutt_edit_attachment (BODY * a) } else if (a->type == TYPETEXT) { /* On text, default to editor */ - mutt_edit_file (NONULL (Editor), newfile); + mutt_edit_file (NONULL (Editor), a->filename); } else { rfc1524_free_entry (&entry); @@ -460,7 +463,7 @@ int mutt_view_attachment (FILE * fp, BODY * a, int flag, HEADER * hdr, if (fp && !use_mailcap && a->filename) { /* recv case */ strfcpy (pagerfile, a->filename, sizeof (pagerfile)); - mutt_adv_mktemp (pagerfile, sizeof (pagerfile)); + mutt_adv_mktemp (NULL, pagerfile, sizeof (pagerfile)); } else mutt_mktemp (pagerfile);