diff options
| author | Eli Zaretskii | 2018-12-29 10:15:50 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-12-29 10:15:50 +0200 |
| commit | 7a60a4f449da800e624cac67d590cd128820aae2 (patch) | |
| tree | c1343dd8089aca3c72ff190b29fc24d4f9072cc6 | |
| parent | 822a2d039f7f411e1e41160b163cf24752aea971 (diff) | |
| download | emacs-7a60a4f449da800e624cac67d590cd128820aae2.tar.gz emacs-7a60a4f449da800e624cac67d590cd128820aae2.zip | |
Fix remote directories in Eshell on MS-Windows
* lisp/files.el (cd): Support remote directory names on
MS-Windows. (Bug#33791)
| -rw-r--r-- | lisp/files.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el index eb09a7c83f5..0b82c943347 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -801,9 +801,16 @@ The path separator is colon in GNU and GNU-like systems." | |||
| 801 | (setq cd-path (or (parse-colon-path (getenv "CDPATH")) | 801 | (setq cd-path (or (parse-colon-path (getenv "CDPATH")) |
| 802 | (list "./")))) | 802 | (list "./")))) |
| 803 | (cd-absolute | 803 | (cd-absolute |
| 804 | (or (locate-file dir cd-path nil | 804 | (or |
| 805 | (lambda (f) (and (file-directory-p f) 'dir-ok))) | 805 | ;; locate-file doesn't support remote file names, so detect them |
| 806 | (error "No such directory found via CDPATH environment variable")))) | 806 | ;; and support them here by hand. |
| 807 | (and (file-remote-p (expand-file-name dir)) | ||
| 808 | (file-name-absolute-p (expand-file-name dir)) | ||
| 809 | (file-accessible-directory-p (expand-file-name dir)) | ||
| 810 | (expand-file-name dir)) | ||
| 811 | (locate-file dir cd-path nil | ||
| 812 | (lambda (f) (and (file-directory-p f) 'dir-ok))) | ||
| 813 | (error "No such directory found via CDPATH environment variable")))) | ||
| 807 | 814 | ||
| 808 | (defun directory-files-recursively (dir regexp &optional include-directories) | 815 | (defun directory-files-recursively (dir regexp &optional include-directories) |
| 809 | "Return list of all files under DIR that have file names matching REGEXP. | 816 | "Return list of all files under DIR that have file names matching REGEXP. |