changeset 64224:ce7ebac36002

(dired-compare-directories): Remove "." and ".." from the alists.
author Richard M. Stallman <rms@gnu.org>
date Mon, 11 Jul 2005 04:24:46 +0000
parents 12e95a3f6745
children b85492b64a9b
files lisp/dired-aux.el
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired-aux.el	Mon Jul 11 04:05:39 2005 +0000
+++ b/lisp/dired-aux.el	Mon Jul 11 04:24:46 2005 +0000
@@ -126,16 +126,21 @@
   (let* ((dir1 (dired-current-directory))
          (file-alist1 (dired-files-attributes dir1))
          (file-alist2 (dired-files-attributes dir2))
-	 (file-list1 (mapcar
+	 file-list1 file-list2)
+    (setq file-alist1 (delq (assoc "." file-alist1) file-alist1))
+    (setq file-alist1 (delq (assoc ".." file-alist1) file-alist1))
+    (setq file-alist2 (delq (assoc "." file-alist2) file-alist2))
+    (setq file-alist2 (delq (assoc ".." file-alist2) file-alist2))
+    (setq file-list1 (mapcar
 		      'cadr
                       (dired-file-set-difference
                        file-alist1 file-alist2
-		       predicate)))
-	 (file-list2 (mapcar
+		       predicate))
+	  file-list2 (mapcar
 		      'cadr
                       (dired-file-set-difference
                        file-alist2 file-alist1
-		       predicate))))
+		       predicate)))
     (dired-fun-in-all-buffers
      dir1 nil
      (lambda ()