diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-01-24 11:20:25 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-01-24 11:20:25 +0000 |
commit | 6957ae33a931950d03cbba0d0cb78be1920f26f3 (patch) | |
tree | c72209b8851f00c733b352cdc983bcc297a9fe2e /receiver.c | |
parent | 8a5d6bba0921ed8a2c931316d8fcae0b05b9ed2f (diff) | |
download | rsync-6957ae33a931950d03cbba0d0cb78be1920f26f3.tar.gz |
moved file deletion to before the fork() to prevent a race condition
pointed out by byrnes@curl.com
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -102,7 +102,7 @@ static void delete_one(struct file_struct *f) /* this deletes any files on the receiving side that are not present on the sending side. For version 1.6.4 I have changed the behaviour to match more closely what most people seem to expect of this option */ -static void delete_files(struct file_list *flist) +void delete_files(struct file_list *flist) { struct file_list *local_file_list; int i, j; @@ -316,12 +316,6 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen) rprintf(FINFO,"recv_files(%d) starting\n",flist->count); } - if (!delete_after) { - if (recurse && delete_mode && !local_name && flist->count>0) { - delete_files(flist); - } - } - while (1) { cleanup_disable(); |