]> git.eshelyaron.com Git - emacs.git/commitdiff
Expand file name for remote dirs as well
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 29 Apr 2020 19:46:17 +0000 (22:46 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 29 Apr 2020 19:46:17 +0000 (22:46 +0300)
* lisp/progmodes/project.el (project--files-in-directory):
Expand file name for remote dirs as well (bug#40940).

lisp/progmodes/project.el

index dbc967b885190e5c5de9adceca7580aec9262bf7..f5f4092babf8e9234fca6566093aa1e0c79446c1 100644 (file)
@@ -186,16 +186,14 @@ to find the list of ignores for each directory."
   (require 'xref)
   (defvar find-name-arg)
   (let* ((default-directory dir)
-         (dirname (file-remote-p dir 'localname))
-         (dirname (or dirname
-                      ;; Make sure ~/ etc. in local directory name is
-                      ;; expanded and not left for the shell command
-                      ;; to interpret.
-                      (expand-file-name dir)))
+         ;; 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)))
          (command (format "%s %s %s -type f %s -print0"
                           find-program
-                          dirname
-                          (xref--find-ignores-arguments ignores dirname)
+                          localdir
+                          (xref--find-ignores-arguments ignores localdir)
                           (if files
                               (concat (shell-quote-argument "(")
                                       " " find-name-arg " "