summaryrefslogtreecommitdiff
path: root/pith/mailcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'pith/mailcap.c')
-rw-r--r--pith/mailcap.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/pith/mailcap.c b/pith/mailcap.c
index 5c0acda..c7f0a84 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';