]> git.eshelyaron.com Git - emacs.git/commitdiff
(insert-directory): Don't treat FILE as a wildcard if FILE exists as
authorEli Zaretskii <eliz@gnu.org>
Sat, 23 Jun 2007 09:52:06 +0000 (09:52 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 23 Jun 2007 09:52:06 +0000 (09:52 +0000)
a directory.

lisp/ChangeLog
lisp/ls-lisp.el

index b8277ef6be77ab57ae3823b91b3e9157b067c17f..e2441910578861be7a1989859e1629b15eebe8fc 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-23  Eli Zaretskii  <eliz@gnu.org>
+
+       * ls-lisp.el (insert-directory): Don't treat FILE as a wildcard if
+       FILE exists as a directory.
+
 2007-06-21  Reto Zimmermann  <reto@gnu.org>
 
        * vera-mode.el (vera-mode): Fix `commend-end-skip' setting.
index 94c8004ff5e427faabc6c89b87dbc9c154413de3..5d6d68e32711274c57718636dcd9b5ac21c301cd 100644 (file)
@@ -229,7 +229,10 @@ that work are: A a c i r S s t u U X g G B C R and F partly."
        ;; `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)))))