summaryrefslogtreecommitdiff
path: root/lisp/ls-lisp.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2009-03-27 18:34:58 +0000
committerEli Zaretskii <eliz@gnu.org>2009-03-27 18:34:58 +0000
commit0c6af6ddeb02686dfc754b404bd035414c3915fe (patch)
tree24b230cedbd8857f54f188e2f81bbf668d3b2213 /lisp/ls-lisp.el
parent5a9aae2ec9867f38788c139883213b47d354a13b (diff)
downloademacs-0c6af6ddeb02686dfc754b404bd035414c3915fe.tar.gz
(ls-lisp-insert-directory): Allow for a trailing '/' when looking for "."
and "..". (Bug#2801)
Diffstat (limited to 'lisp/ls-lisp.el')
-rw-r--r--lisp/ls-lisp.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 0374b9bbaed..060e4011a4a 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -390,7 +390,10 @@ not contain `d', so that a full listing is expected."
(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