diff options
author | Wayne Davison <wayned@samba.org> | 2006-05-09 17:38:47 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2006-05-09 17:38:47 +0000 |
commit | 01d124d9e251317cdd9f12fb170a94e65f3c5e18 (patch) | |
tree | bdf9c7a0091dcf2b90211c51c61f0cf52b4b2162 /receiver.c | |
parent | 58a06312a4891ed375614d60ba92ce2a54d68a5e (diff) | |
download | rsync-01d124d9e251317cdd9f12fb170a94e65f3c5e18.tar.gz rsync-01d124d9e251317cdd9f12fb170a94e65f3c5e18.tar.bz2 rsync-01d124d9e251317cdd9f12fb170a94e65f3c5e18.zip |
If the --partial-dir value is an absolute path and we use a file in
it as an alternate basis file, make sure that we delete it when the
associated destination file is successfully updated.
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -617,9 +617,14 @@ int recv_files(int f_in, struct file_list *flist, char *local_name) } if ((recv_ok && (!delay_updates || !partialptr)) || inplace) { - if (partialptr == fname || *partial_dir == '/') - partialptr = NULL; - finish_transfer(fname, fnametmp, partialptr, + char *temp_copy_name; + if (partialptr == fname) + partialptr = temp_copy_name = NULL; + else if (*partial_dir == '/') + temp_copy_name = NULL; + else + temp_copy_name = partialptr; + finish_transfer(fname, fnametmp, temp_copy_name, file, recv_ok, 1); if (fnamecmp == partialptr) { do_unlink(partialptr); |