On Thu, Mar 31, 2005 at 02:34:14PM +0200, Vidar Madsen wrote:
> I just spotted another peculiarity when inspecting the rsync log. When
> using --compare-dest, source files that have permissions that differ
> from the "comparables" are not logged, unless you're using -i.

I think I have a better heuristic for this case.  Attached is a patch
that makes rsync itemize the copy as a "local change" (so the leading
'c' will get set) and output the name of the locally-copied file if
itemized-output is not enabled.

..wayne..
--- generator.c 31 Mar 2005 23:30:03 -0000      1.195
+++ generator.c 1 Apr 2005 18:10:27 -0000
@@ -923,8 +923,25 @@ static void recv_generator(char *fname, 
                                        }
                                        match_level = 0;
                                        statret = -1;
-                               } else
-                                       set_perms(fname, file, NULL, 0);
+                               } else {
+                                       if (itemizing) {
+                                               itemize(file, ndx, 0, &st,
+                                                       ITEM_LOCAL_CHANGE, 0,
+                                                       NULL);
+                                       } else if (verbose && code) {
+                                               rprintf(code, "%s\n",
+                                                       safe_fname(fname));
+                                       }
+                                       set_perms(fname, file, NULL,
+                                                 maybe_PERMS_REPORT);
+                                       if (preserve_hard_links
+                                           && file->link_u.links) {
+                                               hard_link_cluster(file, ndx,
+                                                                 itemizing,
+                                                                 code);
+                                       }
+                                       return;
+                               }
                        } else if (compare_dest || match_level == 1) {
                                fnamecmp = fnamecmpbuf;
                                fnamecmp_type = i;
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to