]> code.delx.au - gnu-emacs/commitdiff
(ls-lisp-insert-directory): Make -B work
authorDrew Adams <drew.adams@oracle.com>
Tue, 23 Feb 2016 10:12:55 +0000 (21:12 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 23 Feb 2016 10:13:35 +0000 (21:13 +1100)
* lisp/ls-lisp.el (ls-lisp-insert-directory): Make -B work
(bug#20776).

Backport:

(cherry picked from commit ef52e66efd78aac4c4e5bd5e11870e5ba3b37a1e)

lisp/ls-lisp.el

index 6b5304caada0906510f219a3d3f46fc88a0cfeed..85e91cdadc0e719b3462756564fc94ebb65ce24c 100644 (file)
@@ -348,7 +348,9 @@ SWITCHES is a *list* of characters.  TIME-INDEX is the time index into
 file-attributes according to SWITCHES.  WILDCARD-REGEXP is nil or an *Emacs
 regexp*.  FULL-DIRECTORY-P means file is a directory and SWITCHES does
 not contain `d', so that a full listing is expected."
-  (if (or wildcard-regexp full-directory-p)
+  (if (or (and wildcard-regexp
+               (not (string= "[^~]\\'" wildcard-regexp))) ; Switch -B pseudo-wildcard regexp
+          full-directory-p)
       (let* ((dir (file-name-as-directory file))
             (default-directory dir)    ; so that file-attributes works
             (file-alist