From 0b87c8f75ca66dd08ffc33bfd6df314f11397b06 Mon Sep 17 00:00:00 2001 From: tomo Date: Sun, 14 Dec 2003 15:15:00 +0000 Subject: [PATCH] (mime-entity-filename): Decode quoted-encoded-words when `mime-header-accept-quoted-encoded-words' is not nil. --- mime.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mime.el b/mime.el index 005790e..4195225 100644 --- a/mime.el +++ b/mime.el @@ -391,13 +391,16 @@ default value." (defun mime-entity-filename (entity) "Return filename of ENTITY." (or (mime-entity-uu-filename entity) - (mime-content-disposition-filename - (mime-entity-content-disposition entity)) + (let ((ret (mime-content-disposition-filename + (mime-entity-content-disposition entity)))) + (if (and mime-header-accept-quoted-encoded-words + ret) + (eword-decode-string ret) + ret)) (cdr (let ((param (mime-content-type-parameters (mime-entity-content-type entity)))) (or (assoc "name" param) - (assoc "x-name" param)) - )))) + (assoc "x-name" param)))))) (defsubst mime-entity-media-type (entity) -- 1.7.10.4