Commit e3cd4b53 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(dired-internal-noselect): When setting default-directory,

don't check file-name-directory.
parent cb35a83c
...@@ -481,9 +481,11 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh." ...@@ -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"))))) "Directory has changed on disk; type \\[revert-buffer] to update Dired")))))
;; Else a new buffer ;; Else a new buffer
(setq default-directory (setq default-directory
(if (file-directory-p dirname) ;; We can do this unconditionally
dirname ;; because dired-noselect ensures that the name
(file-name-directory dirname))) ;; 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)) (or switches (setq switches dired-listing-switches))
(dired-mode dirname switches) (dired-mode dirname switches)
(if mode (funcall mode)) (if mode (funcall mode))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment