From: Pietro Cerutti Date: Wed, 7 Nov 2018 16:29:27 +0000 (+0000) Subject: Unlink temporary attachment files on mutt_timeout_hook X-Git-Tag: 2019-10-25~549^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=950a46553cc22b609b4b898caa1ddbffc537383a;p=neomutt Unlink temporary attachment files on mutt_timeout_hook --- diff --git a/hook.c b/hook.c index edb16f55f..46118a33f 100644 --- a/hook.c +++ b/hook.c @@ -40,6 +40,7 @@ #include "alias.h" #include "globals.h" #include "hdrline.h" +#include "mutt_attach.h" #include "muttlib.h" #include "mx.h" #include "ncrypt/ncrypt.h" @@ -689,6 +690,9 @@ void mutt_timeout_hook(void) } } FREE(&token.data); + + /* Delete temporary attachment files */ + mutt_unlink_temp_attachments(); } /** diff --git a/mutt_attach.c b/mutt_attach.c index be6566717..c91ed6c7a 100644 --- a/mutt_attach.c +++ b/mutt_attach.c @@ -636,7 +636,7 @@ return_error: { if (fp && tempfile[0]) { - /* add temporary file to TempAttachmentsList to be deleted on exit */ + /* add temporary file to TempAttachmentsList to be deleted on timeout hook */ mutt_add_temp_attachment(tempfile); } else if (unlink_tempfile)