dry_run = 0;
if (!get_tmpname(fnametmp, "deldelay")
|| (deldelay_fd = do_mkstemp(fnametmp, 0600)) < 0) {
- rprintf(FINFO, "NOTE: Unable to create delete-delay temp file--"
- "switching to --delete-after.\n");
+ rprintf(FINFO, "NOTE: Unable to create delete-delay temp file%s.\n",
+ incremental ? "" : " -- switching to --delete-after");
delete_during = 0;
- delete_after = 1;
+ delete_after = !incremental;
dry_run = save_dry_run;
return 0;
}
|| stdout_format_has_i > 1 || (xname && *xname)) && !read_batch) {
if (protocol_version >= 29) {
if (ndx >= 0)
- write_int(sock_f_out, ndx + cur_flist->ndx_start);
+ write_ndx(sock_f_out, ndx + cur_flist->ndx_start);
write_shortint(sock_f_out, iflags);
if (iflags & ITEM_BASIS_TYPE_FOLLOWS)
write_byte(sock_f_out, fnamecmp_type);
if (preserve_hard_links && F_IS_HLINKED(file))
file->flags |= FLAG_FILE_SENT;
#endif
- write_int(f_out, ndx + cur_flist->ndx_start);
+ write_ndx(f_out, ndx + cur_flist->ndx_start);
if (itemizing) {
int iflags = ITEM_TRANSFER;
if (always_checksum > 0)
phase);
}
- write_int(f_out, NDX_DONE);
+ write_ndx(f_out, NDX_DONE);
}
csum_length = SUM_LENGTH;
}
}
- flist_free(cur_flist);
+ flist_free(first_flist); /* updates cur_flist & first_flist */
if (!read_batch)
- write_int(f_out, NDX_DONE);
+ write_ndx(f_out, NDX_DONE);
}
} while ((cur_flist = next_flist) != NULL);
if (verbose > 2)
rprintf(FINFO, "generate_files phase=%d\n", phase);
- write_int(f_out, NDX_DONE);
+ write_ndx(f_out, NDX_DONE);
/* Reduce round-trip lag-time for a useless delay-updates phase. */
if (protocol_version >= 29 && !delay_updates)
- write_int(f_out, NDX_DONE);
+ write_ndx(f_out, NDX_DONE);
/* Read MSG_DONE for the redo phase (and any prior messages). */
while (done_cnt <= 1) {
if (verbose > 2)
rprintf(FINFO, "generate_files phase=%d\n", phase);
if (delay_updates)
- write_int(f_out, NDX_DONE);
+ write_ndx(f_out, NDX_DONE);
/* Read MSG_DONE for delay-updates phase & prior messages. */
while (done_cnt == 2)
wait_for_receiver();