- /* Acts on the_file_list->file's ndx'th item, whose name is fname. If a dir,
-@@ -1154,8 +1297,12 @@ static void recv_generator(char *fname,
- if (real_ret != 0 && one_file_system)
- real_st.st_dev = filesystem_dev;
- if (delete_during && f_out != -1 && !phase && dry_run < 2
-- && (file->flags & FLAG_DEL_HERE))
-- delete_in_dir(the_file_list, fname, file, &real_st);
-+ && (file->flags & FLAG_DEL_HERE)) {
-+ if (detect_renamed && real_ret != 0)
-+ unexplored_dirs++;
-+ delete_in_dir(the_file_list, fname, file, &real_st,
-+ delete_during < 0 ? DEL_NO_DELETIONS : 0);
-+ }
- return;
- }
-
-@@ -1407,8 +1554,14 @@ static void recv_generator(char *fname,
- && hard_link_check(file, ndx, fname, statret, &st,
- itemizing, code, HL_SKIP))
- return;
+@@ -1502,9 +1651,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+ }
+ else if (delete_during && f_out != -1 && !phase
+ && !(file->flags & FLAG_MISSING_DIR)) {
+- if (file->flags & FLAG_CONTENT_DIR)
+- delete_in_dir(fname, file, &real_sx.st.st_dev);
+- else
++ if (file->flags & FLAG_CONTENT_DIR) {
++ if (detect_renamed && real_ret != 0)
++ unexplored_dirs++;
++ delete_in_dir(fname, file, &real_sx.st.st_dev,
++ delete_during < 0 ? DEL_NO_DELETIONS : 0);
++ } else
+ change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
+ }
+ goto cleanup;
+@@ -1782,8 +1934,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+ goto cleanup;
+ }
+ #endif