Mercurial > emacs
changeset 102747:cf4d6724a83b
(ls-lisp-insert-directory): Allow for a trailing '/' when looking for "."
and "..". (Bug#2801)
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 27 Mar 2009 18:34:03 +0000 |
parents | 9e4328a0286b |
children | ef4cce3abb27 |
files | lisp/ls-lisp.el |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ls-lisp.el Fri Mar 27 18:30:55 2009 +0000 +++ b/lisp/ls-lisp.el Fri Mar 27 18:34:03 2009 +0000 @@ -390,7 +390,10 @@ (setq elt (car file-alist) file-alist (cdr file-alist)) (when (and (eq (cadr elt) t) ; directory - (not (string-match "\\`\\.\\.?\\'" (car elt)))) + ;; Under -F, we have already decorated all + ;; directories, including "." and "..", with + ;; a /, so allow for that as well. + (not (string-match "\\`\\.\\.?/?\\'" (car elt)))) (setq elt (expand-file-name (car elt) dir)) (insert "\n" elt ":\n") (ls-lisp-insert-directory