From: Brendan Cully Date: Sat, 3 Sep 2005 23:22:30 +0000 (+0000) Subject: Note when mutt_edit_attachment fails and display error instead of prompting X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36188bb6eff7b9ebdb29d5c527f897e7130b1901;p=neomutt Note when mutt_edit_attachment fails and display error instead of prompting to abort an unmodified file. Closes: #2051. --- diff --git a/attach.c b/attach.c index 5ba1cce4d..a8521b3df 100644 --- a/attach.c +++ b/attach.c @@ -256,12 +256,16 @@ int mutt_edit_attachment (BODY *a) { /* 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) + { mutt_error (_("Error running \"%s\"!"), command); + goto bailout; + } } } } diff --git a/send.c b/send.c index 3de3e5d9a..29b319877 100644 --- a/send.c +++ b/send.c @@ -1353,7 +1353,7 @@ ci_send_message (int flags, /* send mode */ { struct stat st; time_t mtime = mutt_decrease_mtime (msg->content->filename, NULL); - + mutt_update_encoding (msg->content); /* @@ -1373,7 +1373,10 @@ ci_send_message (int flags, /* send mode */ { /* If the this isn't a text message, look for a mailcap edit command */ if (mutt_needs_mailcap (msg->content)) - mutt_edit_attachment (msg->content); + { + if (!mutt_edit_attachment (msg->content)) + goto cleanup; + } else if (!Editor || mutt_strcmp ("builtin", Editor) == 0) mutt_builtin_editor (msg->content->filename, msg, cur); else if (option (OPTEDITHDRS))