[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 7a60a4f: Fix remote directories in Eshell on MS-W
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 7a60a4f: Fix remote directories in Eshell on MS-Windows |
Date: |
Sat, 29 Dec 2018 03:16:50 -0500 (EST) |
branch: emacs-26
commit 7a60a4f449da800e624cac67d590cd128820aae2
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix remote directories in Eshell on MS-Windows
* lisp/files.el (cd): Support remote directory names on
MS-Windows. (Bug#33791)
---
lisp/files.el | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/lisp/files.el b/lisp/files.el
index eb09a7c..0b82c94 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -801,9 +801,16 @@ The path separator is colon in GNU and GNU-like systems."
(setq cd-path (or (parse-colon-path (getenv "CDPATH"))
(list "./"))))
(cd-absolute
- (or (locate-file dir cd-path nil
- (lambda (f) (and (file-directory-p f) 'dir-ok)))
- (error "No such directory found via CDPATH environment variable"))))
+ (or
+ ;; locate-file doesn't support remote file names, so detect them
+ ;; 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)
"Return list of all files under DIR that have file names matching REGEXP.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 7a60a4f: Fix remote directories in Eshell on MS-Windows,
Eli Zaretskii <=