process directory permissions and times ater hard links becuase the
authorAndrew Tridgell <tridge@samba.org>
Mon, 15 Dec 1997 22:23:30 +0000 (22:23 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 15 Dec 1997 22:23:30 +0000 (22:23 +0000)
hard link processing can modify the directory times

main.c
rsync.c

diff --git a/main.c b/main.c
index 246a6ac..3fbdea1 100644 (file)
--- a/main.c
+++ b/main.c
@@ -334,8 +334,6 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
 
   if ((pid=fork()) == 0) {
     recv_files(f_in,flist,local_name,recv_pipe[1]);
-    if (preserve_hard_links)
-      do_hard_links(flist);
     if (verbose > 2)
       fprintf(FERROR,"receiver read %d\n",read_total());
     exit_cleanup(0);
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");