X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=recvattach.c;h=198bfa7f762a30db095a28475d7f3e3a7055188a;hp=94ef9abbb17e985a194bdd06a07d060cb0224bdf;hb=d56fddbfbd785459ebbfba6d3ab7c233bbadf3c1;hpb=1a79031e2cd056f6f7d95dfaccc58323251521ba diff --git a/recvattach.c b/recvattach.c index 94ef9ab..198bfa7 100644 --- a/recvattach.c +++ b/recvattach.c @@ -486,24 +486,24 @@ void mutt_save_attachment_list (FILE * fp, int tag, BODY * top, HEADER * hdr, } static void -mutt_query_pipe_attachment (char *command, FILE * fp, BODY * body, int afilter) +mutt_query_pipe_attachment(char *command, FILE * fp, BODY * body, int afilter) { char tfile[_POSIX_PATH_MAX]; char warning[STRING + _POSIX_PATH_MAX]; - int tempfd; + int tempfd = -1; if (afilter) { - snprintf (warning, sizeof (warning), - _("WARNING! You are about to overwrite %s, continue?"), - body->filename); + snprintf(warning, sizeof (warning), + _("WARNING! You are about to overwrite %s, continue?"), + body->filename); if (mutt_yesorno (warning, M_NO) != M_YES) { CLEARLINE (LINES - 1); return; } - tempfd = m_tempfd(tfile, sizeof(tfile), NONULL(Tempdir), NULL); + tempfd = m_tempfd(tfile, sizeof(tfile), NONULL(MCore.tmpdir), NULL); } - if (mutt_pipe_attachment (fp, body, command, tempfd)) { + if (mutt_pipe_attachment(fp, body, command, tempfd)) { if (afilter) { mutt_unlink (body->filename); mutt_rename_file (tfile, body->filename); @@ -634,7 +634,7 @@ static void print_attachment_list (FILE * fp, int tag, BODY * top, FILE *ifp; int newfile_fd; - newfile_fd = m_tempfd(newfile, sizeof(newfile), NONULL(Tempdir), NULL); + newfile_fd = m_tempfd(newfile, sizeof(newfile), NONULL(MCore.tmpdir), NULL); if (mutt_decode_save_attachment (fp, top, newfile_fd, M_PRINTING) == 0) { if ((ifp = fopen (newfile, "r")) != NULL) { mutt_copy_stream (ifp, state->fpout);