- set_perms(fname,&flist->files[i],NULL,0);
+ set_perms(fname,file,NULL,0);
+
+ if (!recv_ok) {
+ if (verbose > 1)
+ fprintf(FERROR,"redoing %s(%d)\n",fname,i);
+ if (csum_length == SUM_LENGTH)
+ fprintf(FERROR,"ERROR: file corruption in %s\n",fname);
+ write_int(f_gen,i);
+ }
+ }
+
+ /* 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);