From: tomo Date: Sun, 14 Dec 2003 15:15:00 +0000 (+0000) Subject: (mime-entity-filename): Decode quoted-encoded-words when X-Git-Tag: flim-1_14_6~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0b87c8f75ca66dd08ffc33bfd6df314f11397b06;p=elisp%2Fflim.git (mime-entity-filename): Decode quoted-encoded-words when `mime-header-accept-quoted-encoded-words' is not nil. --- 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)