summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2021-05-17 21:59:57 +0200
committerPhilipp Stephani <phst@google.com>2021-05-23 13:03:49 +0200
commit2e55201b8085d64c76d9a35bffff90a02133647e (patch)
treeece9a2f0124064543d7339e4bcf6f99ac8ca65d6
parentfc87cdf95986667bf083fdab01df20a6a07d5d0f (diff)
downloademacs-2e55201b8085d64c76d9a35bffff90a02133647e.tar.gz
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.
-rw-r--r--lisp/progmodes/project.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 047f55ed1ae..eab60756c8f 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -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 "(")