* lisp/gnus/gnus-art.el (gnus-mime-replace-part): Don't replace
the part if the file to replace it with doesn't exist (bug#36864).
(list
(read-file-name "Replace MIME part with file: "
(or mm-default-directory default-directory)
- nil nil)))
+ nil t)))
+ (unless (file-regular-p (file-truename file))
+ (error "Can't replace part with %s, which isn't a regular file"
+ file))
(gnus-mime-save-part-and-strip file))
(defun gnus-mime-save-part-and-strip (&optional file)