]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-internal-noselect): When setting default-directory,
authorRichard M. Stallman <rms@gnu.org>
Sun, 13 Apr 1997 20:19:19 +0000 (20:19 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 13 Apr 1997 20:19:19 +0000 (20:19 +0000)
don't check file-name-directory.

lisp/dired.el

index 3792af9727adc4a267c7bca9d43b39ca647fc793..5f25f933d8dc88c3ed15f9133e39b0e8e7a441e3 100644 (file)
@@ -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))