If the combination of --dry-run, --link-dest, and -H finds a matching
authorWayne Davison <wayned@samba.org>
Mon, 9 Oct 2006 02:59:23 +0000 (02:59 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 9 Oct 2006 02:59:23 +0000 (02:59 +0000)
file in on of the extra basis dirs, make a note of which basis dir
we would have used in the hard-link with the destination file.

generator.c

index b36bc4d..15cd325 100644 (file)
@@ -657,8 +657,11 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                                          itemizing && verbose > 1,
                                          code) < 0)
                                goto try_a_copy;
-                       if (preserve_hard_links && file->link_u.links)
+                       if (preserve_hard_links && file->link_u.links) {
+                               if (dry_run)
+                                       file->link_u.links->link_dest_used = j + 1;
                                hard_link_cluster(file, ndx, itemizing, code);
+                       }
                } else
 #endif
                if (itemizing)