Commit 2121cd9c authored by Roland McGrath's avatar Roland McGrath
Browse files

(cd): Fix interactive spec to require match if there is no CDPATH.

parent a6ed60f4
......@@ -300,7 +300,9 @@ If your environment includes a `CDPATH' variable, try each one of that
colon-separated list of directories when resolving a relative directory name."
(list (read-file-name "Change default directory: "
default-directory default-directory)))
default-directory default-directory
(and (member cd-path '(nil ("./")))
(null (getenv "CDPATH"))))))
(if (file-name-absolute-p dir)
(cd-absolute (expand-file-name dir))
(if (null cd-path)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment