The --delete-during processing only happens during the first phase

(not the redo phase).  We also call delete_in_dir(NULL, NULL) to
make sure that all the local filter files get popped.
This commit is contained in:
Wayne Davison
2005-01-30 10:06:18 +00:00
parent 19b2a5d9fd
commit c93fad5ee0

View File

@@ -315,7 +315,7 @@ static void recv_generator(char *fname, struct file_list *flist,
if (set_perms(fname, file, statret ? NULL : &st, 0)
&& verbose && f_out != -1)
rprintf(FINFO, "%s/\n", safe_fname(fname));
if (delete_during && f_out != -1
if (delete_during && f_out != -1 && csum_length != SUM_LENGTH
&& (file->flags & FLAG_DEL_START))
delete_in_dir(flist, fname);
return;
@@ -651,6 +651,8 @@ void generate_files(int f_out, struct file_list *flist, char *local_name,
recv_generator(local_name ? local_name : f_name_to(file, fbuf),
flist, file, i, f_out, f_out_name);
}
if (delete_during)
delete_in_dir(NULL, NULL);
phase++;
csum_length = SUM_LENGTH;