Merge pull request #2118 from danielfleischer/attachment

Attachments Saving Improvement
This commit is contained in:
Dirk-Jan C. Binnema 2021-08-30 18:31:21 +03:00 committed by GitHub
commit b349b24689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -491,7 +491,10 @@ containing commas."
#'completing-read-multiple))
dir)
(dolist (part parts)
(let ((fname (cdr (assoc 'filename (assoc "attachment" (cdr part))))))
(let ((fname (or (cdr (assoc 'filename (assoc "attachment" (cdr part))))
(cl-loop for item in part
for name = (and (listp item) (assoc-default 'name item))
thereis (and (stringp name) name)))))
(when fname
(push `(,fname . ,(cdr part)) handles)
(push fname files))))