Commit 0c6af6dd authored by Eli Zaretskii's avatar Eli Zaretskii

(ls-lisp-insert-directory): Allow for a trailing '/' when looking for "."

and "..".  (Bug#2801)
parent 5a9aae2e
2009-03-27 Eli Zaretskii <eliz@gnu.org>
* ls-lisp.el (ls-lisp-insert-directory): Allow for a trailing '/'
when looking for "." and "..". (Bug#2801)
2009-03-27 Andreas Schwab <schwab@linux-m68k.org>
* simple.el (shift-select-mode): Make it a defcustom.
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment