diff options
author | Wayne Davison <wayned@samba.org> | 2009-04-04 07:24:38 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2009-04-04 07:25:25 -0700 |
commit | 83c32ca572364c0bbd28bff88664f1041f48a3f5 (patch) | |
tree | d87f830742d130c259338d434bec526208802941 /receiver.c | |
parent | 1a85a969a7f1283e90e289c686d2d4fd2d78ff80 (diff) | |
download | android_external_rsync-83c32ca572364c0bbd28bff88664f1041f48a3f5.tar.gz android_external_rsync-83c32ca572364c0bbd28bff88664f1041f48a3f5.tar.bz2 android_external_rsync-83c32ca572364c0bbd28bff88664f1041f48a3f5.zip |
Fixed --dry-run with --read-batch:
- Avoid sending MSG_NO_SEND to the generator.
- Check if the file is wanted before discarding the batched data.
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -361,7 +361,7 @@ static void no_batched_update(int ndx, BOOL is_redo) rprintf(FERROR_XFER, "(No batched update for%s \"%s\")\n", is_redo ? " resend of" : "", f_name(file, NULL)); - if (inc_recurse) + if (inc_recurse && !dry_run) send_msg_int(MSG_NO_SEND, ndx); } @@ -562,19 +562,6 @@ int recv_files(int f_in, char *local_name) exit_cleanup(RERR_PROTOCOL); } - if (!do_xfers) { /* log the transfer */ - log_item(FCLIENT, file, &stats, iflags, NULL); - if (read_batch) - discard_receive_data(f_in, F_LENGTH(file)); - continue; - } - if (write_batch < 0) { - log_item(FCLIENT, file, &stats, iflags, NULL); - if (!am_server) - discard_receive_data(f_in, F_LENGTH(file)); - continue; - } - if (read_batch) { int wanted = redoing ? we_want_redo(ndx) @@ -590,6 +577,19 @@ int recv_files(int f_in, char *local_name) } } + if (!do_xfers) { /* log the transfer */ + log_item(FCLIENT, file, &stats, iflags, NULL); + if (read_batch) + discard_receive_data(f_in, F_LENGTH(file)); + continue; + } + if (write_batch < 0) { + log_item(FCLIENT, file, &stats, iflags, NULL); + if (!am_server) + discard_receive_data(f_in, F_LENGTH(file)); + continue; + } + partialptr = partial_dir ? partial_dir_fname(fname) : fname; if (protocol_version >= 29) { |