X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=recvattach.c;h=b9237f80b115c8d185e7af4d82b01a43eeb74220;hb=e01486aabea6f0af36933158bd58b9ab03b30add;hp=2e161ac034351c698aafb15920f7c0bd352f7e41;hpb=c3e57678c8be193fc137854020f3a90887be97c9;p=apps%2Fmadmutt.git diff --git a/recvattach.c b/recvattach.c index 2e161ac..b9237f8 100644 --- a/recvattach.c +++ b/recvattach.c @@ -17,13 +17,16 @@ #include "mutt_menu.h" #include "rfc1524.h" #include "mime.h" -#include "mailbox.h" #include "attach.h" #include "mapping.h" #include "mx.h" #include "copy.h" #include "mutt_crypt.h" +#include "lib/mem.h" +#include "lib/intl.h" +#include "lib/str.h" + #include #include #include @@ -93,7 +96,7 @@ void mutt_update_tree (ATTACHPTR ** idx, short idxlen) if (idx[x]->tree) { if (mutt_strcmp (idx[x]->tree, buf) != 0) - mutt_str_replace (&idx[x]->tree, buf); + str_replace (&idx[x]->tree, buf); } else idx[x]->tree = safe_strdup (buf); @@ -883,7 +886,7 @@ void mutt_view_attachments (HEADER * hdr) char helpstr[SHORT_STRING]; MUTTMENU *menu; - BODY *cur; + BODY *cur = NULL; MESSAGE *msg; FILE *fp; ATTACHPTR **idx = NULL; @@ -1074,7 +1077,7 @@ void mutt_view_attachments (HEADER * hdr) } #endif - if (WithCrypto && hdr->security) { + if (WithCrypto && (hdr->security & (~PGP_TRADITIONAL_CHECKED))) { mutt_message _ ("Deletion of attachments from encrypted messages is unsupported."); @@ -1172,7 +1175,7 @@ void mutt_view_attachments (HEADER * hdr) CHECK_ATTACH; if (!idx[menu->current]->content->hdr->env->followup_to || - mutt_strcasecmp (idx[menu->current]->content->hdr->env->followup_to, + safe_strcasecmp (idx[menu->current]->content->hdr->env->followup_to, "poster") || query_quadoption (OPT_FOLLOWUPTOPOSTER, _("Reply by mail as poster prefers?")) !=