summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index c694df38268..3490d0428a0 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5069,7 +5069,7 @@ On most systems, this will be true:
(setq filename (and dir (directory-file-name dir)))
;; If there's nothing left to peel off, we're at the root and
;; we can stop.
- (when (equal dir filename)
+ (when (and dir (equal dir filename))
(push "" components)
(setq filename nil))))
components))