mu4e-mime-parts: don't try to open non-files

When completion fails, don't try to open any files in
mu4e-view-save-attachments.
This commit is contained in:
Dirk-Jan C. Binnema
2024-10-08 23:32:25 +03:00
parent f9af40adee
commit aa4946cfe5

View File

@ -316,8 +316,10 @@ does not have this limitation."
(path (mu4e--uniqify-file-name
(mu4e-join-paths
(or custom-dir (plist-get part :target-dir))
(plist-get part :filename)))))
(mm-save-part-to-file (plist-get part :handle) path)))
(plist-get part :filename))))
(handle (plist-get part :handle)))
(when handle ;; completion may fail, and then there's no handle.
(mm-save-part-to-file handle path))))
files)))
(defvar mu4e-view-mime-part-actions