]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-insert-directory): Don't assume Unix-style dir names.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 10 Jun 2008 19:10:42 +0000 (19:10 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 10 Jun 2008 19:10:42 +0000 (19:10 +0000)
lisp/ChangeLog
lisp/dired.el

index 99927a698ddc5c38ab4b8574948188174f916553..bbe2b11433dc78e608170ee8c30179ce61bbdc7a 100644 (file)
@@ -1,5 +1,7 @@
 2008-06-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * dired.el (dired-insert-directory): Don't assume Unix-style dir names.
+
        * subr.el (momentary-string-display): Use an overlay.
 
        * progmodes/compile.el (compilation-mode):
index d15e32f70fb36e358b2f29b74456c1db67f87d65..61c3549ecc1831017c56e7ebd1ae938977194452 100644 (file)
@@ -1044,7 +1044,9 @@ If HDR is non-nil, insert a header line with the directory name."
     ;; Insert text at the beginning to standardize things.
     (save-excursion
       (goto-char opoint)
-      (if (and (or hdr wildcard) (not (looking-at "^  /.*:$")))
+      (if (and (or hdr wildcard)
+               (not (and (looking-at "^  \\(.*\\):$")
+                         (file-name-absolute-p (match-string 1)))))
          ;; Note that dired-build-subdir-alist will replace the name
          ;; by its expansion, so it does not matter whether what we insert
          ;; here is fully expanded, but it should be absolute.