summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-07-20 22:04:53 +0000
committerRichard M. Stallman <rms@gnu.org>1993-07-20 22:04:53 +0000
commite33e80e4a1fee3f2656e6f73318fdfd02612a018 (patch)
treeef6ecdeb9679a490437a13a35571ace58ba9ff93 /lisp/files.el
parent1a47fa1367e6b41622fa336e1b15f62755504639 (diff)
downloademacs-e33e80e4a1fee3f2656e6f73318fdfd02612a018.tar.gz
(parse-colon-path): Turn empty substring into nil.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 5ed1ad4b7ab..8edf13a5c4d 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -258,8 +258,10 @@ Not actually set up until the first time you you use it.")
(setq cd-list
(nconc cd-list
(list (substitute-in-file-name
- (file-name-as-directory
- (substring cd-path cd-start cd-colon))))))
+ (if (= cd-start cd-colon)
+ "."
+ (file-name-as-directory
+ (substring cd-path cd-start cd-colon)))))))
(setq cd-start (+ cd-colon 1)))
cd-list)))