diff options
author | Kevin McCarthy <kevin@8t8.us> | 2020-03-30 13:22:16 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2020-03-30 13:22:16 -0700 |
commit | e84cf8973a793998a20779648796429661a90de0 (patch) | |
tree | a92aeb7879d30dea05294bafe563a0acf39319ab /edit.c | |
parent | 18cef028ed41d333f14df66fb546772646f39a41 (diff) |
Convert built-in editor to use mutt_buffer_expand_path().
Diffstat (limited to 'edit.c')
-rw-r--r-- | edit.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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")); |