diff options
author | Erich Eckner <git@eckner.net> | 2019-02-20 13:47:31 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-01-20 19:18:53 +0100 |
commit | 1d577701f415030bb215b997e6fb4c2ab993b1a3 (patch) | |
tree | 0b4c6f00dd2c1c891df6165a8cf8ddcf20a01d9e /pith/mailcap.c | |
parent | 4fcb1dccfa8ee416684d560a5c0f45aed8a12807 (diff) | |
download | alpine-topal-patch.tar.xz |
topal-patch-2 appliedtopal-patch
Diffstat (limited to 'pith/mailcap.c')
-rw-r--r-- | pith/mailcap.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pith/mailcap.c b/pith/mailcap.c index 5c0acda9..c7f0a847 100644 --- a/pith/mailcap.c +++ b/pith/mailcap.c @@ -583,8 +583,17 @@ mc_get_command(int type, char *subtype, BODY *body, * typically two scans through the check_extension * mechanism, the mailcap entry now takes precedence. */ - if((fname = get_filename_parameter(NULL, 0, body, &e2b.from.ext)) != NULL - && e2b.from.ext && e2b.from.ext[0]){ + /* Topal hack 2 */ + fname = get_filename_parameter(NULL, 0, body, &e2b.from.ext); + if (fname == NULL) { + if (body->type == TYPEMULTIPART && + ((body->subtype && !strucmp(body->subtype, "signed")) + ||(body->subtype && !strucmp(body->subtype, "encrypted")))) + fname = cpystr("openpgp.msg"); + } + + if(fname != NULL + && e2b.from.ext && e2b.from.ext[0]){ if(strlen(e2b.from.ext) < sizeof(tmp_ext) - 2){ strncpy(ext = tmp_ext, e2b.from.ext - 1, sizeof(tmp_ext)); /* remember it */ tmp_ext[sizeof(tmp_ext)-1] = '\0'; |