mirror of https://github.com/djcb/mu.git
Extracting attachments #2116
Different MIME configuration needs a fallback logic. Instead of looking for the attachment "fname" in `("attachment" . (filename "fname"))` structure, we find the same file name in `("mime-type" . (name . "fname"))` structure by searching, since we don't know the MIME type beforehand. Thanks @thierryvolpiatto.
This commit is contained in:
parent
4404a57365
commit
151a2a323f
|
@ -491,7 +491,10 @@ containing commas."
|
||||||
#'completing-read-multiple))
|
#'completing-read-multiple))
|
||||||
dir)
|
dir)
|
||||||
(dolist (part parts)
|
(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
|
(when fname
|
||||||
(push `(,fname . ,(cdr part)) handles)
|
(push `(,fname . ,(cdr part)) handles)
|
||||||
(push fname files))))
|
(push fname files))))
|
||||||
|
|
Loading…
Reference in New Issue