changeset 17439:5d1881f8c7f1

(dired-internal-noselect): When setting default-directory, don't check file-name-directory.
author Richard M. Stallman <rms@gnu.org>
date Sun, 13 Apr 1997 20:19:19 +0000
parents 368547942e03
children 03d612dba255
files lisp/dired.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired.el	Sun Apr 13 20:08:59 1997 +0000
+++ b/lisp/dired.el	Sun Apr 13 20:19:19 1997 +0000
@@ -481,9 +481,11 @@
 			   "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))