X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=hook.c;h=b157f05119b5e03a3c22e54e611930138a49d259;hb=6e0187ce721be4997bef32d724528f8976df89d6;hp=d7931c02dce4ba61539494bbb4125998f03ca5a0;hpb=2f07c6b3c1987ae22529a8e7bf9084d5ea590542;p=apps%2Fmadmutt.git diff --git a/hook.c b/hook.c index d7931c0..b157f05 100644 --- a/hook.c +++ b/hook.c @@ -20,6 +20,10 @@ #include "mailbox.h" #include "mutt_crypt.h" +#ifdef USE_COMPRESSED +#include "compress.h" +#endif + #include #include #include @@ -88,6 +92,16 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) memset (&pattern, 0, sizeof (pattern)); pattern.data = safe_strdup (path); } +#ifdef USE_COMPRESSED + else if (data & (M_APPENDHOOK | M_OPENHOOK | M_CLOSEHOOK)) + { + if (mutt_test_compress_command (command.data)) + { + strfcpy (err->data, _("bad formatted command string"), err->dsize); + return (-1); + } + } +#endif else if (DefaultHook && !(data & (M_CHARSETHOOK | M_ACCOUNTHOOK)) && (!WithCrypto || !(data & M_CRYPTHOOK)) )