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

(list-directory): Set default-directory better if the

argument is a directory's file name.
parent 01dbd8a0
......@@ -2536,7 +2536,10 @@ and `list-directory-verbose-switches'."
(set-buffer "*Directory*")
(setq default-directory (file-name-directory dirname))
(setq default-directory
(if (file-directory-p dirname)
(file-name-as-directory dirname)
(file-name-directory dirname)))
(let ((wildcard (not (file-directory-p dirname))))
(insert-directory dirname switches wildcard (not wildcard)))))))
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