]> granicus.if.org Git - neomutt/commitdiff
icommands.c: Unify error messages about temp file creation
authorReis Radomil <reisradomil@fake-box.com>
Sun, 28 Apr 2019 13:03:12 +0000 (13:03 +0000)
committerRichard Russon <rich@flatcap.org>
Tue, 30 Apr 2019 16:38:27 +0000 (17:38 +0100)
Unify all the messages stating that the temporary file could not be
created to include the filename of the temporary file.

icommands.c

index 03019ba67eb50dedb5ef7f447b86e449b61bd3b3..afa81d0c80822fcef6d246546b9f444063d64370 100644 (file)
@@ -312,7 +312,7 @@ static enum CommandResult icmd_set(struct Buffer *buf, struct Buffer *s,
   FILE *fp_out = mutt_file_fopen(tempfile, "w");
   if (!fp_out)
   {
-    mutt_buffer_addstr(err, _("Could not create temporary file"));
+    mutt_buffer_printf(err, _("Could not create temporary file %s"), tempfile);
     return MUTT_CMD_ERROR;
   }
 
@@ -335,7 +335,7 @@ static enum CommandResult icmd_set(struct Buffer *buf, struct Buffer *s,
   struct Pager info = { 0 };
   if (mutt_pager("set", tempfile, MUTT_PAGER_NO_FLAGS, &info) == -1)
   {
-    mutt_buffer_addstr(err, _("Could not create temporary file"));
+    mutt_buffer_printf(err, _("Could not create temporary file %s"), tempfile);
     return MUTT_CMD_ERROR;
   }
 
@@ -354,7 +354,7 @@ static enum CommandResult icmd_version(struct Buffer *buf, struct Buffer *s,
   FILE *fp_out = mutt_file_fopen(tempfile, "w");
   if (!fp_out)
   {
-    mutt_buffer_addstr(err, _("Could not create temporary file"));
+    mutt_buffer_printf(err, _("Could not create temporary file %s"), tempfile);
     return MUTT_CMD_ERROR;
   }
 
@@ -364,7 +364,7 @@ static enum CommandResult icmd_version(struct Buffer *buf, struct Buffer *s,
   struct Pager info = { 0 };
   if (mutt_pager("version", tempfile, MUTT_PAGER_NO_FLAGS, &info) == -1)
   {
-    mutt_buffer_addstr(err, _("Could not create temporary file"));
+    mutt_buffer_printf(err, _("Could not create temporary file %s"), tempfile);
     return MUTT_CMD_ERROR;
   }