summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-04-13 20:19:19 +0000
committerRichard M. Stallman <rms@gnu.org>1997-04-13 20:19:19 +0000
commite3cd4b53c518ee04eae13e52825fc9ffb5ba59e9 (patch)
treeb9287544ff02581e75357cb0ebe1978c51ee17ae
parentcb35a83c0e5942a08de4d5ab2ca6dbd378ac1993 (diff)
downloademacs-e3cd4b53c518ee04eae13e52825fc9ffb5ba59e9.tar.gz
(dired-internal-noselect): When setting default-directory,
don't check file-name-directory.
-rw-r--r--lisp/dired.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index 3792af9727a..5f25f933d8d 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -481,9 +481,11 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh."
"Directory has changed on disk; type \\[revert-buffer] to update Dired")))))
;; Else a new buffer
(setq default-directory
- (if (file-directory-p dirname)
- dirname
- (file-name-directory dirname)))
+ ;; We can do this unconditionally
+ ;; because dired-noselect ensures that the name
+ ;; is passed in directory name syntax
+ ;; if it was the name of a directory at all.
+ (file-name-directory dirname))
(or switches (setq switches dired-listing-switches))
(dired-mode dirname switches)
(if mode (funcall mode))