MCPcopy Index your code
hub / github.com/RsyncProject/rsync / handle_delayed_updates

Function handle_delayed_updates

receiver.c:529–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529static void handle_delayed_updates(char *local_name)
530{
531 char *fname, *partialptr;
532 int ndx;
533
534 for (ndx = -1; (ndx = bitbag_next_bit(delayed_bits, ndx)) >= 0; ) {
535 struct file_struct *file = cur_flist->files[ndx];
536 fname = local_name ? local_name : f_name(file, NULL);
537 if ((partialptr = partial_dir_fname(fname)) != NULL) {
538 if (make_backups > 0 && !make_backup(fname, False))
539 continue;
540 if (DEBUG_GTE(RECV, 1)) {
541 rprintf(FINFO, "renaming %s to %s\n",
542 partialptr, fname);
543 }
544 /* We don't use robust_rename() here because the
545 * partial-dir must be on the same drive. */
546 if (do_rename_at(partialptr, fname) < 0) {
547 rsyserr(FERROR_XFER, errno,
548 "rename failed for %s (from %s)",
549 full_fname(fname), partialptr);
550 } else {
551 if (remove_source_files || (preserve_hard_links && F_IS_HLINKED(file)))
552 send_msg_success(fname, ndx);
553 handle_partial_dir(partialptr, PDIR_DELETE);
554 }
555 }
556 }
557}
558
559static void no_batched_update(int ndx, BOOL is_redo)
560{

Callers 1

recv_filesFunction · 0.85

Calls 10

bitbag_next_bitFunction · 0.85
f_nameFunction · 0.85
partial_dir_fnameFunction · 0.85
make_backupFunction · 0.85
do_rename_atFunction · 0.85
full_fnameFunction · 0.85
send_msg_successFunction · 0.85
handle_partial_dirFunction · 0.85
rprintfFunction · 0.70
rsyserrFunction · 0.70

Tested by

no test coverage detected