project-search: Pipe the list of files through 'file-regular-p'

* lisp/progmodes/project.el (project-search): Pipe the list of
files through 'file-regular-p' to skip directories (bug#62735).
This commit is contained in:
Dmitry Gutov 2023-04-10 02:08:48 +03:00
parent d6af1f1498
commit 589959fb09

View file

@ -1216,7 +1216,10 @@ To continue searching for the next match, use the
command \\[fileloop-continue]."
(interactive "sSearch (regexp): ")
(fileloop-initialize-search
regexp (project-files (project-current t)) 'default)
regexp
;; XXX: See the comment in project-query-replace-regexp.
(cl-delete-if-not #'file-regular-p (project-files (project-current t)))
'default)
(fileloop-continue))
;;;###autoload