if (!p)
mutt_error(_("Error: multipart/encrypted has no protocol parameter!"));
- else if (tok == MIME_APPLICATION_PGP_ENCRYPTED)
+ else if (mime_which_token(p, -1) == MIME_APPLICATION_PGP_ENCRYPTED)
handler = crypt_pgp_encrypted_handler;
}
if (!plaintext) {
/* decode to a tempfile, saving the original destination */
fp = s->fpout;
- s->fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
+ s->fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL);
if (!s->fpout) {
mutt_error _("Unable to open temporary file!");
goto bail;