# HG changeset patch # User Eli Zaretskii # Date 1182591941 0 # Node ID 22fda78091afb371d52c363ba93627854f0abdfe # Parent 419b76a6cca5529cd71973f3a87e3900aa0b3a10 (insert-directory): Don't treat FILE as a wildcard if FILE exists as a directory. diff -r 419b76a6cca5 -r 22fda78091af lisp/ls-lisp.el --- a/lisp/ls-lisp.el Sat Jun 23 04:49:44 2007 +0000 +++ b/lisp/ls-lisp.el Sat Jun 23 09:45:41 2007 +0000 @@ -229,7 +229,10 @@ ;; `ls' don't mind, we certainly do, because it makes us think ;; there is no wildcard, only a directory name. (if (and ls-lisp-support-shell-wildcards - (string-match "[[?*]" file)) + (string-match "[[?*]" file) + ;; Prefer an existing directory to wildcards, like + ;; dired-noselect does. + (not (file-directory-p file))) (progn (or (not (eq (aref file (1- (length file))) ?/)) (setq file (substring file 0 (1- (length file)))))