Fix find invocation for macOS (Bug#48471).

* lisp/progmodes/project.el (project--files-in-directory): Instead of
appending a slash (which doesn't work well with macOS find), remove
trailing slash and pass -H instead.
This commit is contained in:
Philipp Stephani 2021-05-17 21:59:57 +02:00
parent fc87cdf959
commit 2e55201b80

View file

@ -297,11 +297,10 @@ to find the list of ignores for each directory."
;; expanded and not left for the shell command
;; to interpret.
(localdir (file-name-unquote (file-local-name (expand-file-name dir))))
(command (format "%s %s %s -type f %s -print0"
(command (format "%s -H %s %s -type f %s -print0"
find-program
(shell-quote-argument
;; In case DIR is a symlink.
(file-name-as-directory localdir))
(directory-file-name localdir)) ; Bug#48471
(xref--find-ignores-arguments ignores localdir)
(if files
(concat (shell-quote-argument "(")