summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-12-30 16:57:36 -0800
committerGlenn Morris <rgm@gnu.org>2018-12-30 16:57:36 -0800
commita8e545ef6b92f6eb5916a6803a5d95256fd9eb6b (patch)
tree38752101a9dcceb10009f017bced8e0a213e21ed /lisp/files.el
parent83bbb48142e5f9714408dd628d244678eff2dc11 (diff)
parent3abebeb8c3047092763f2d4a61fe7dfc659cd1bf (diff)
downloademacs-a8e545ef6b92f6eb5916a6803a5d95256fd9eb6b.tar.gz
Merge from origin/emacs-26
3abebeb * lisp/files.el (cd): Fix last change. (Bug#33791) 7a60a4f Fix remote directories in Eshell on MS-Windows 822a2d0 Fix :type 'group' in defcustom a731c56 Fix NS fringe bitmap drawing bug (bug#33864) 0c52459 Fix commentary in dispnew.c c9fdd1b Improve accept-process-process doc 9578c2a Fix a simple bug in display-buffer-use-some-frame 0f9be72 Clarify thread switching while waiting for process output 24ddea0 Improve process doc. with respect to handling of large input ... 2931016 ; Cosmetic changes in etc/NEWS 85516b8 Minor copyedits in landmark.el # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 448df62710c..fb09c96c47e 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -802,9 +802,15 @@ 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-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.