Fixed a problem where a --link-dest hard-link could cause us to
authorWayne Davison <wayned@samba.org>
Sat, 23 Apr 2005 19:46:22 +0000 (19:46 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 23 Apr 2005 19:46:22 +0000 (19:46 +0000)
miss out on the hard_link_cluster() call.

generator.c

index 3bb3749..13749f0 100644 (file)
@@ -914,8 +914,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                                if (hard_link_one(file, ndx, fname, -1, &st,
                                                  fnamecmpbuf, 1,
                                                  itemizing && verbose > 1,
-                                                 code) == 0)
+                                                 code) == 0) {
+                                       if (preserve_hard_links
+                                           && file->link_u.links) {
+                                               hard_link_cluster(file, ndx,
+                                                                 itemizing,
+                                                                 code);
+                                       }
                                        return;
+                               }
                                match_level = 2;
                        }
 #endif