| 527 | } |
| 528 | |
| 529 | static 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 | |
| 559 | static void no_batched_update(int ndx, BOOL is_redo) |
| 560 | { |
no test coverage detected