Fix mutt_save_message() "enter_fname()" to use buffer version
authorKevin McCarthy <kevin@8t8.us>
Sun, 22 Sep 2019 01:34:51 +0000 (18:34 -0700)
committerRichard Russon <rich@flatcap.org>
Tue, 1 Oct 2019 10:25:08 +0000 (11:25 +0100)
Commit be632f11 converted this function to use the buffer pool, but
accidentally used the non-buffer prompt when there was already a
buffer-converted version.

Co-authored-by: Richard Russon <rich@flatcap.org>
commands.c

index 9f59c02e051bd8a810de97e5a6e618700892401c..3cc114876202055390eb883a63b3c90fb03d04d4 100644 (file)
@@ -1044,9 +1044,8 @@ int mutt_save_message(struct Mailbox *m, struct EmailList *el,
   mutt_buffer_fix_dptr(buf);
 
   mutt_buffer_pretty_mailbox(buf);
-  if (mutt_enter_fname(prompt, buf->data, buf->dsize, 0) == -1)
+  if (mutt_buffer_enter_fname(prompt, buf, 0) == -1)
     goto cleanup;
-  mutt_buffer_fix_dptr(buf);
 
   size_t pathlen = mutt_buffer_len(buf);
   if (pathlen == 0)