The --delete-during processing only happens during the first phase
authorWayne Davison <wayned@samba.org>
Sun, 30 Jan 2005 10:06:18 +0000 (10:06 +0000)
committerWayne Davison <wayned@samba.org>
Sun, 30 Jan 2005 10:06:18 +0000 (10:06 +0000)
(not the redo phase).  We also call delete_in_dir(NULL, NULL) to
make sure that all the local filter files get popped.

generator.c

index 88e369e..afa6436 100644 (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;