any up-to-date file (non-dir).
extern int delete_after;
extern int module_id;
extern int ignore_errors;
extern int delete_after;
extern int module_id;
extern int ignore_errors;
-extern int remove_sent_files;
+extern int remove_sender_files;
extern int delay_updates;
extern int update_only;
extern int ignore_existing;
extern int delay_updates;
extern int update_only;
extern int ignore_existing;
+ if (remove_sender_files == 1)
+ goto return_with_success;
rprintf(code, "%s -> %s\n", fname,
file->u.link);
}
rprintf(code, "%s -> %s\n", fname,
file->u.link);
}
- if (remove_sent_files && !dry_run) {
- char numbuf[4];
- SIVAL(numbuf, 0, ndx);
- send_msg(MSG_SUCCESS, numbuf, 4);
- }
if (preserve_hard_links && file->link_u.links)
hard_link_cluster(file, ndx, itemizing, code);
if (preserve_hard_links && file->link_u.links)
hard_link_cluster(file, ndx, itemizing, code);
+ if (remove_sender_files)
+ goto return_with_success;
hard_link_cluster(file, ndx,
itemizing, code);
}
hard_link_cluster(file, ndx,
itemizing, code);
}
+ if (remove_sender_files == 1)
+ goto return_with_success;
}
} else {
if (itemizing)
}
} else {
if (itemizing)
set_file_attrs(fname, file, &st, maybe_ATTRS_REPORT);
if (preserve_hard_links && file->link_u.links)
hard_link_cluster(file, ndx, itemizing, code);
set_file_attrs(fname, file, &st, maybe_ATTRS_REPORT);
if (preserve_hard_links && file->link_u.links)
hard_link_cluster(file, ndx, itemizing, code);
+ if (remove_sender_files == 1)
+ goto return_with_success;
if (statret != 0 && basis_dir[0] != NULL) {
int j = try_dests_reg(file, fname, ndx, fnamecmpbuf, &st,
itemizing, maybe_ATTRS_REPORT, code);
if (statret != 0 && basis_dir[0] != NULL) {
int j = try_dests_reg(file, fname, ndx, fnamecmpbuf, &st,
itemizing, maybe_ATTRS_REPORT, code);
+ if (j == -2) {
+ if (remove_sender_files == 1)
+ goto return_with_success;
if (j != -1) {
fnamecmp = fnamecmpbuf;
fnamecmp_type = j;
if (j != -1) {
fnamecmp = fnamecmpbuf;
fnamecmp_type = j;
set_file_attrs(fname, file, &st, maybe_ATTRS_REPORT);
if (preserve_hard_links && file->link_u.links)
hard_link_cluster(file, ndx, itemizing, code);
set_file_attrs(fname, file, &st, maybe_ATTRS_REPORT);
if (preserve_hard_links && file->link_u.links)
hard_link_cluster(file, ndx, itemizing, code);
+ if (remove_sender_files != 1)
+ return;
+ return_with_success:
+ if (!dry_run) {
+ char numbuf[4];
+ SIVAL(numbuf, 0, ndx);
+ send_msg(MSG_SUCCESS, numbuf, 4);
+ }
rprintf(FINFO, "generating and sending sums for %d\n", ndx);
notify_others:
rprintf(FINFO, "generating and sending sums for %d\n", ndx);
notify_others:
- if (remove_sent_files && !delay_updates && !phase)
- increment_active_files(ndx, itemizing, code);
+ if (remove_sender_files && !delay_updates && !phase)
+ increment_active_files(ndx, itemizing, code);
write_int(f_out, ndx);
if (itemizing) {
int iflags = ITEM_TRANSFER;
write_int(f_out, ndx);
if (itemizing) {
int iflags = ITEM_TRANSFER;