Merge pull request #896 from avar/fix-tempfile-bug-in-831

Actually make the "write attachments" feature in d16957d work
This commit is contained in:
Dirk-Jan C. Binnema 2016-08-02 08:05:43 +03:00 committed by GitHub
commit 501306cde8
1 changed files with 3 additions and 2 deletions

View File

@ -93,8 +93,9 @@ return the filename."
(if (plist-get attachment :temp)
(replace-match (format "src=\"%s\"" (plist-get attachment :temp)))
(replace-match (format "src=\"%s%s\"" temporary-file-directory (plist-get attachment :name)))
(mu4e~proc-extract 'save (mu4e-message-field msg :docid) (plist-get attachment :index) mu4e-decryption-policy temporary-file-directory)
(mu4e-remove-file-later (format "%s%s" temporary-file-directory (plist-get attachment :name))))))
(let ((tmp-attachment-name (format "%s%s" temporary-file-directory (plist-get attachment :name))))
(mu4e~proc-extract 'save (mu4e-message-field msg :docid) (plist-get attachment :index) mu4e-decryption-policy tmp-attachment-name)
(mu4e-remove-file-later tmp-attachment-name)))))
attachments)
(save-buffer)
tmpfile)))