diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 1edbe069a4c..1023b75e668 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -296,12 +296,11 @@ to find the list of ignores for each directory." ;; Make sure ~/ etc. in local directory name is ;; expanded and not left for the shell command ;; to interpret. - (localdir (file-local-name (expand-file-name dir))) + (localdir (file-name-unquote (file-local-name (expand-file-name dir)))) (command (format "%s %s %s -type f %s -print0" find-program ;; In case DIR is a symlink. - (file-name-unquote - (file-name-as-directory localdir)) + (file-name-as-directory localdir) (xref--find-ignores-arguments ignores localdir) (if files (concat (shell-quote-argument "(") diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index cada1f11092..3d2f21ab52f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1416,7 +1416,8 @@ IGNORES is a list of glob patterns for files to ignore." (command (xref--rgrep-command (xref--regexp-to-extended regexp) files (file-name-as-directory - (file-local-name (expand-file-name dir))) + (file-name-unquote + (file-local-name (expand-file-name dir)))) ignores)) (def default-directory) (buf (get-buffer-create " *xref-grep*"))