[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27203: 25.2; rmail doesn't handle mime if rmail-mime-attachment-dirs
From: |
Glenn Morris |
Subject: |
bug#27203: 25.2; rmail doesn't handle mime if rmail-mime-attachment-dirs-alist gives no valid destination |
Date: |
Fri, 02 Jun 2017 20:43:37 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Version: 26.1
Thanks, I applied the following:
commit 73635ed
Date: Fri Jun 2 20:42:01 2017 -0400
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 c6b9cfd..1ffd466 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"))