From: Glenn Morris Date: Sat, 3 Jun 2017 00:42:01 +0000 (-0400) Subject: Small rmailmm fix (bug#27203) X-Git-Tag: emacs-26.0.90~521^2~178 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=73635edb43e0e4a31cfe8af41ccb07c32836b148;p=emacs.git Small rmailmm fix (bug#27203) * lisp/mail/rmailmm.el (rmail-mime-insert-bulk): Fall back to HOME if no match in rmail-mime-attachment-dirs-alist. --- diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index c6b9cfddb66..1ffd4668ac8 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -817,12 +817,13 @@ directly." (bulk-data (aref tagline 1)) (body (rmail-mime-entity-body entity)) ;; Find the default directory for this media type. - (directory (catch 'directory - (dolist (entry rmail-mime-attachment-dirs-alist) - (when (string-match (car entry) (car content-type)) - (dolist (dir (cdr entry)) - (when (file-directory-p dir) - (throw 'directory dir))))))) + (directory (or (catch 'directory + (dolist (entry rmail-mime-attachment-dirs-alist) + (when (string-match (car entry) (car content-type)) + (dolist (dir (cdr entry)) + (when (file-directory-p dir) + (throw 'directory dir)))))) + "~")) (filename (or (cdr (assq 'name (cdr content-type))) (cdr (assq 'filename (cdr content-disposition))) "noname"))