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);
}
}
+ 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");