1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-24 10:38:38 +00:00

(ls-lisp-insert-directory): Make -B work

* lisp/ls-lisp.el (ls-lisp-insert-directory): Make -B work
(bug#20776).

Backport:

(cherry picked from commit ef52e66efd)
This commit is contained in:
Drew Adams 2016-02-23 21:12:55 +11:00 committed by Lars Ingebrigtsen
parent 42bc065a6a
commit dfe16506a9

View 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