]> git.eshelyaron.com Git - emacs.git/commitdiff
(ls-lisp-insert-directory): Allow for a trailing '/' when looking for "."
authorEli Zaretskii <eliz@gnu.org>
Fri, 27 Mar 2009 18:34:58 +0000 (18:34 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 27 Mar 2009 18:34:58 +0000 (18:34 +0000)
and "..".  (Bug#2801)

lisp/ChangeLog
lisp/ls-lisp.el

index 00e5df9f5e90040304739da9870ea1f80b4c68a9..d797e665d48ac4212d8fab544fff24c28b711dbd 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 0374b9bbaed59fa339ab88ec571d3e36041880c9..060e4011a4a83795285564c4448f513b87eb65c1 100644 (file)
@@ -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