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 515e605fb2f..63dd66be1a8 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -372,7 +372,7 @@ Do not specify them in other calls."
(if handler
(setq filename (funcall handler 'file-truename filename)
done t)
- (let ((dir (file-name-directory filename))
+ (let ((dir (or (file-name-directory filename) default-directory))
target dirfile)
;; Get the truename of the directory.
(setq dirfile (directory-file-name dir))