X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=attach.c;h=913dbb7522fbf280c5f19936d3249acfa206c675;hp=0b97d5ab3566d4f97e5524d80c916f9cd77a3f50;hb=9ed6c0f86855d82f8b95b3f623bf2639f0f19d0b;hpb=e83dbdbc6200a71981d06773869cd0492f81f16c diff --git a/attach.c b/attach.c index 0b97d5a..913dbb7 100644 --- a/attach.c +++ b/attach.c @@ -156,7 +156,7 @@ int mutt_compose_attachment (BODY * a) /* Remove headers by copying out data to another file, then * copying the file back */ - fseek (fp, b->offset, 0); + fseeko (fp, b->offset, 0); mutt_mktemp (tempfile); if ((tfp = safe_fopen (tempfile, "w")) == NULL) { mutt_perror (_("Failure to open file to strip headers.")); @@ -238,11 +238,14 @@ int mutt_edit_attachment (BODY * a) command, sizeof (command))) { /* For now, editing requires a file, no piping */ mutt_error _("Mailcap Edit entry requires %%s"); + goto bailout; } else { mutt_endwin (NULL); - if (mutt_system (command) == -1) + if (mutt_system (command) == -1) { mutt_error (_("Error running \"%s\"!"), command); + goto bailout; + } } } } @@ -721,7 +724,7 @@ int mutt_save_attachment (FILE * fp, BODY * m, char *path, int flags, hn->msgno = hdr->msgno; /* required for MH/maildir */ hn->read = 1; - fseek (fp, m->offset, 0); + fseeko (fp, m->offset, 0); if (fgets (buf, sizeof (buf), fp) == NULL) return -1; if (mx_open_mailbox (path, M_APPEND | M_QUIET, &ctx) == NULL) @@ -756,7 +759,7 @@ int mutt_save_attachment (FILE * fp, BODY * m, char *path, int flags, mutt_perror ("fopen"); return (-1); } - fseek ((s.fpin = fp), m->offset, 0); + fseeko ((s.fpin = fp), m->offset, 0); mutt_decode_attachment (m, &s); if (fclose (s.fpout) != 0) {