From 4aaf1ef7670b37c54320161a8fc3386479588dc0 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sat, 21 Oct 2017 16:51:38 +0100 Subject: [PATCH] call the folder-hook before saving to $record --- hook.c | 2 +- protos.h | 2 +- sendlib.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hook.c b/hook.c index a4f4c8f6c..0087b0d28 100644 --- a/hook.c +++ b/hook.c @@ -328,7 +328,7 @@ int mutt_parse_unhook(struct Buffer *buf, struct Buffer *s, unsigned long data, return 0; } -void mutt_folder_hook(char *path) +void mutt_folder_hook(const char *path) { struct Hook *tmp = NULL; struct Buffer err, token; diff --git a/protos.h b/protos.h index 2d52c1ab1..e1c2fb5c1 100644 --- a/protos.h +++ b/protos.h @@ -183,7 +183,7 @@ void mutt_enter_command(void); void mutt_expand_file_fmt(char *dest, size_t destlen, const char *fmt, const char *src); void mutt_expand_fmt(char *dest, size_t destlen, const char *fmt, const char *src); void mutt_fix_reply_recipients(struct Envelope *env); -void mutt_folder_hook(char *path); +void mutt_folder_hook(const char *path); void mutt_simple_format(char *dest, size_t destlen, int min_width, int max_width, int justify, char m_pad_char, const char *s, size_t n, int arboreal); void mutt_format_s(char *dest, size_t destlen, const char *prefix, const char *s); diff --git a/sendlib.c b/sendlib.c index 36fd6fbe8..ab1779655 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2981,6 +2981,7 @@ int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid, if (post) set_noconv_flags(hdr->content, 1); + mutt_folder_hook(path); if (mx_open_mailbox(path, MUTT_APPEND | MUTT_QUIET, &f) == NULL) { mutt_debug(1, "mutt_write_fcc(): unable to open mailbox %s in append-mode, " -- 2.50.1