From: Rocco Rutte Date: Wed, 13 May 2009 16:03:34 +0000 (+0200) Subject: Don't loose error message when attachment saving fails. Closes #3156. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=506389eb4eafbcb27b7367d3b1cd2c1f55627279;p=neomutt Don't loose error message when attachment saving fails. Closes #3156. --- diff --git a/attach.c b/attach.c index 9290f9752..20376bfec 100644 --- a/attach.c +++ b/attach.c @@ -805,6 +805,7 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) if ((s.fpout = mutt_save_attachment_open (path, flags)) == NULL) { mutt_perror ("fopen"); + mutt_sleep (2); return (-1); } fseeko ((s.fpin = fp), m->offset, 0); @@ -813,6 +814,7 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) if (fclose (s.fpout) != 0) { mutt_perror ("fclose"); + mutt_sleep (2); return (-1); } } diff --git a/recvattach.c b/recvattach.c index 398a416e1..e2c4c773c 100644 --- a/recvattach.c +++ b/recvattach.c @@ -433,7 +433,10 @@ static int mutt_query_save_attachment (FILE *fp, BODY *body, HEADER *hdr, char * { if (mutt_get_field (prompt, buf, sizeof (buf), M_FILE | M_CLEAR) != 0 || !buf[0]) + { + mutt_clear_error (); return -1; + } prompt = NULL; mutt_expand_path (buf, sizeof (buf));