aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-11-22 09:25:23 +0000
committerRichard M. Stallman <[email protected]>1993-11-22 09:25:23 +0000
commitf45da5d14b243bf8499416217534bf4d61fa485d (patch)
treed72703c271bb884dc638029e0e10301af6050f81
parentb7d52f8ed4f302153f3bbe6eb2110ff81ca567de (diff)
(dired-readin-insert): Expand default-directory and dirname
before comparing them.
-rw-r--r--lisp/dired.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index 8c7c9baa99..2a197ca7a8 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -489,7 +489,9 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh."
(if (consp dir-or-list)
(setq dirname (car dir-or-list))
(setq dirname dir-or-list))
- (if (and (equal default-directory dirname)
+ ;; Expand before comparing in case one or both have been abbreviated.
+ (if (and (equal (expand-file-name default-directory)
+ (expand-file-name dirname))
(not (consp dir-or-list)))
;; If we are reading a whole single directory...
(dired-insert-directory dir-or-list dired-actual-switches nil t)