X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/1dd4f26ab6c1f14628d9fcf03b0cca7e54d52302..c69aef14ddc150da07dcd3527b5a9fb99d6cef34:/lisp/ls-lisp.el diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 6b5304caad..85e91cdadc 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -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