mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-03 08:30:09 +00:00
Fix remote directories in Eshell on MS-Windows
* lisp/files.el (cd): Support remote directory names on MS-Windows. (Bug#33791)
This commit is contained in:
parent
822a2d039f
commit
7a60a4f449
@ -801,9 +801,16 @@ The path separator is colon in GNU and GNU-like systems."
|
|||||||
(setq cd-path (or (parse-colon-path (getenv "CDPATH"))
|
(setq cd-path (or (parse-colon-path (getenv "CDPATH"))
|
||||||
(list "./"))))
|
(list "./"))))
|
||||||
(cd-absolute
|
(cd-absolute
|
||||||
(or (locate-file dir cd-path nil
|
(or
|
||||||
(lambda (f) (and (file-directory-p f) 'dir-ok)))
|
;; locate-file doesn't support remote file names, so detect them
|
||||||
(error "No such directory found via CDPATH environment variable"))))
|
;; and support them here by hand.
|
||||||
|
(and (file-remote-p (expand-file-name dir))
|
||||||
|
(file-name-absolute-p (expand-file-name dir))
|
||||||
|
(file-accessible-directory-p (expand-file-name dir))
|
||||||
|
(expand-file-name dir))
|
||||||
|
(locate-file dir cd-path nil
|
||||||
|
(lambda (f) (and (file-directory-p f) 'dir-ok)))
|
||||||
|
(error "No such directory found via CDPATH environment variable"))))
|
||||||
|
|
||||||
(defun directory-files-recursively (dir regexp &optional include-directories)
|
(defun directory-files-recursively (dir regexp &optional include-directories)
|
||||||
"Return list of all files under DIR that have file names matching REGEXP.
|
"Return list of all files under DIR that have file names matching REGEXP.
|
||||||
|
Loading…
Reference in New Issue
Block a user