summaryrefslogtreecommitdiffstats
path: root/edit.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-03-30 13:22:16 -0700
committerKevin McCarthy <kevin@8t8.us>2020-03-30 13:22:16 -0700
commite84cf8973a793998a20779648796429661a90de0 (patch)
treea92aeb7879d30dea05294bafe563a0acf39319ab /edit.c
parent18cef028ed41d333f14df66fb546772646f39a41 (diff)
Convert built-in editor to use mutt_buffer_expand_path().
Diffstat (limited to 'edit.c')
-rw-r--r--edit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/edit.c b/edit.c
index c72b1c8a..b8f6b749 100644
--- a/edit.c
+++ b/edit.c
@@ -421,9 +421,11 @@ int mutt_builtin_editor (SEND_CONTEXT *sctx)
case 'r':
if (*p)
{
- strncpy(tmp, p, sizeof(tmp));
- mutt_expand_path(tmp, sizeof(tmp));
- buf = be_snarf_file (tmp, buf, &bufmax, &buflen, 1);
+ BUFFER *filename = mutt_buffer_pool_get ();
+ mutt_buffer_strcpy (filename, p);
+ mutt_buffer_expand_path (filename);
+ buf = be_snarf_file (mutt_b2s (filename), buf, &bufmax, &buflen, 1);
+ mutt_buffer_pool_release (&filename);
}
else
addstr (_("missing filename.\n"));