diff options
author | Andrew Tridgell <tridge@samba.org> | 1999-11-08 13:03:05 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1999-11-08 13:03:05 +0000 |
commit | 57df171bc00cd813b5d661960b567a041107af13 (patch) | |
tree | 9103106a12a13318c8ff2e6f1dcff3730c0413ff /receiver.c | |
parent | f08baea3ddb54a99a918a3e0c557b32ca2517c6c (diff) | |
download | rsync-57df171bc00cd813b5d661960b567a041107af13.tar.gz |
added --delete-after option (suggested by Jason)
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -304,14 +304,17 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen) int recv_ok; extern struct stats stats; extern int preserve_perms; + extern int delete_after; struct stats initial_stats; if (verbose > 2) { rprintf(FINFO,"recv_files(%d) starting\n",flist->count); } - if (recurse && delete_mode && !local_name && flist->count>0) { - delete_files(flist); + if (!delete_after) { + if (recurse && delete_mode && !local_name && flist->count>0) { + delete_files(flist); + } } while (1) { @@ -478,6 +481,12 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen) } } + if (delete_after) { + if (recurse && delete_mode && !local_name && flist->count>0) { + delete_files(flist); + } + } + if (preserve_hard_links) do_hard_links(flist); |