From 73635edb43e0e4a31cfe8af41ccb07c32836b148 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 2 Jun 2017 20:42:01 -0400 Subject: [PATCH] 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. --- lisp/mail/rmailmm.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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")) -- 2.39.2