(mime-entity-filename): Decode quoted-encoded-words when
authortomo <tomo>
Sun, 14 Dec 2003 15:15:00 +0000 (15:15 +0000)
committertomo <tomo>
Sun, 14 Dec 2003 15:15:00 +0000 (15:15 +0000)
`mime-header-accept-quoted-encoded-words' is not nil.

mime.el

diff --git a/mime.el b/mime.el
index 005790e..4195225 100644 (file)
--- 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)