diff options
author | Philip Kaludercic <philipk@posteo.net> | 2025-03-19 18:33:01 +0100 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2025-03-19 18:33:31 +0100 |
commit | a77f10305c9ad0354987b09ec9a967021bb47d93 (patch) | |
tree | 3acf4b7c3437a5399e1d6ca6593a3631c56cf6af /lisp/mail/emacsbug.el | |
parent | cf5aaae90bd3961171e9edef6ee1f97b98c266a6 (diff) | |
download | emacs-a77f10305c9ad0354987b09ec9a967021bb47d93.tar.gz emacs-a77f10305c9ad0354987b09ec9a967021bb47d93.tar.bz2 emacs-a77f10305c9ad0354987b09ec9a967021bb47d93.zip |
; 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)
Diffstat (limited to 'lisp/mail/emacsbug.el')
-rw-r--r-- | lisp/mail/emacsbug.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index babfd2e68ae..ad6f1b7a58b 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -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 |