]> git.eshelyaron.com Git - emacs.git/commitdiff
Small rmailmm fix (bug#27203)
authorGlenn Morris <rgm@gnu.org>
Sat, 3 Jun 2017 00:42:01 +0000 (20:42 -0400)
committerGlenn Morris <rgm@gnu.org>
Sat, 3 Jun 2017 00:42:01 +0000 (20:42 -0400)
* 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

index c6b9cfddb666f5fe4d16a4c9605cf6e0a7845501..1ffd4668ac88a841409a6a1d9e47822242d2abeb 100644 (file)
@@ -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"))