+ /* Read post-redo-phase MSG_DONE and any prior messages. */
+ get_redo_num();
+
+ if (preserve_hard_links)
+ do_hard_links(allowed_lull, flist->count);
+
+ if (delete_after && !local_name && flist->count > 0)
+ do_delete_pass(flist, allowed_lull);
+
+ if ((need_retouch_dir_perms || need_retouch_dir_times)
+ && !list_only && !local_name && !dry_run) {
+ int j = 0;
+ /* Now we need to fix any directory permissions that were
+ * modified during the transfer and/or re-set any tweaked
+ * modified-time values. */
+ for (i = 0; i < flist->count; i++) {
+ struct file_struct *file = flist->files[i];
+ if (!file->basename || !S_ISDIR(file->mode))
+ continue;
+ if (!need_retouch_dir_times && file->mode & S_IWUSR)
+ continue;
+ recv_generator(local_name ? local_name : f_name(file),
+ flist, file, i, itemizing,
+ maybe_PERMS_REPORT, code, allowed_lull,
+ -1, -1);
+ if (allowed_lull && !(j++ % lull_mod))
+ maybe_send_keepalive(allowed_lull, flist->count);
+ }