# HG changeset patch # User Eli Zaretskii # Date 1182592278 0 # Node ID ed97a96f45fc5344b497a1393c29e653db977c9a # Parent 7332bae5b7e75dd7db96fb3f612383dfd87ecb53 (insert-directory): Don't treat FILE as a wildcard if FILE exists as a directory. diff -r 7332bae5b7e7 -r ed97a96f45fc lisp/ls-lisp.el --- a/lisp/ls-lisp.el Thu Jun 21 22:55:44 2007 +0000 +++ b/lisp/ls-lisp.el Sat Jun 23 09:51:18 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)))))