1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; Avoid scraping non-readable files for maintainers

* lisp/mail/emacsbug.el (submit-emacs-patch): Check if a file
mentioned in a patch can be opened.  (Bug#77083)
This commit is contained in:
Philip Kaludercic 2025-03-19 18:33:01 +01:00
parent cf5aaae90b
commit a77f10305c
No known key found for this signature in database

View file

@ -543,10 +543,11 @@ Message buffer where you can explain more about the patch."
(with-temp-buffer
(insert-file-contents file)
(while (search-forward-regexp "^\\+\\{3\\} ./\\(.*\\)" nil t)
(push (expand-file-name
(match-string-no-properties 1)
source-directory)
files)))
(let ((file (expand-file-name
(match-string-no-properties 1)
source-directory)))
(when (file-readable-p file)
(push file files)))))
(mapcan
(lambda (patch)
(seq-remove