# HG changeset patch # User Eli Zaretskii # Date 1238178843 0 # Node ID cf4d6724a83b4b913ee30ac02033842a86f566d6 # Parent 9e4328a0286b54c1023c072c5bc7c936c0be29bd (ls-lisp-insert-directory): Allow for a trailing '/' when looking for "." and "..". (Bug#2801) diff -r 9e4328a0286b -r cf4d6724a83b lisp/ls-lisp.el --- 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