process directory permissions and times ater hard links becuase the
[rsync/rsync.git] / rsync.c
diff --git a/rsync.c b/rsync.c
index f66efc6..38bbdcd 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -729,16 +729,16 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
       }
     }
 
+  if (preserve_hard_links)
+         do_hard_links(flist);
+
   /* now we need to fix any directory permissions that were 
      modified during the transfer */
-  if (!am_root) {
-    for (i = 0; i < flist->count; i++) {
-      struct file_struct *file = &flist->files[i];
-      if (!file->name || !S_ISDIR(file->mode)) continue;
-      recv_generator(file->name,flist,i,-1);
-    }
+  for (i = 0; i < flist->count; i++) {
+         struct file_struct *file = &flist->files[i];
+         if (!file->name || !S_ISDIR(file->mode)) continue;
+         recv_generator(file->name,flist,i,-1);
   }
-  
 
   if (verbose > 2)
     fprintf(FERROR,"recv_files finished\n");