Problem: When both --partial and --partial-dir are set, disk_path is under the partial dir for every file and nothing renames completed files into the real destination. On a fully successful run the destination tree is empty and all files sit under dest/partial-dir (verified). Subsequent runs re-transfer everything.
Fix: After a successful write to the partial dir, atomically rename into root_directory; keep file in partial dir only when transfer is interrupted/fails.
Regression test required (integration).
Found by code review + empirical test of `dev` (9f8b588).
**Where:** src/shared/file_receive.c:60-63 (`actual_root` = partial dir whenever partial && partial_dir), :143-151 (write target = partial dir); no rename-back step exists anywhere.
**Problem:** When both `--partial` and `--partial-dir` are set, disk_path is under the partial dir for *every* file and nothing renames completed files into the real destination. On a fully successful run the destination tree is empty and all files sit under dest/partial-dir (verified). Subsequent runs re-transfer everything.
**Fix:** After a successful write to the partial dir, atomically rename into root_directory; keep file in partial dir only when transfer is interrupted/fails.
Regression test required (integration).
Fixed on dev via fix/receiver-correctness (14c064a): completed partial-dir writes are atomically renamed into the destination (file_rename_secure). Integration TestPartialDir added.
CI run #461: all jobs green (lint, build-and-test, sanitizers address+undefined, fuzz-build, coverage, valgrind). Unit 25/25, integration 83 passed / 10 skipped / 1 xpassed. Closing.
**Resolved on `dev`** (HEAD f7c6c91).
Fixed on dev via fix/receiver-correctness (14c064a): completed partial-dir writes are atomically renamed into the destination (file_rename_secure). Integration TestPartialDir added.
CI run #461: all jobs green (lint, build-and-test, sanitizers address+undefined, fuzz-build, coverage, valgrind). Unit 25/25, integration 83 passed / 10 skipped / 1 xpassed. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found by code review + empirical test of
dev(9f8b588).Where: src/shared/file_receive.c:60-63 (
actual_root= partial dir whenever partial && partial_dir), :143-151 (write target = partial dir); no rename-back step exists anywhere.Problem: When both
--partialand--partial-dirare set, disk_path is under the partial dir for every file and nothing renames completed files into the real destination. On a fully successful run the destination tree is empty and all files sit under dest/partial-dir (verified). Subsequent runs re-transfer everything.Fix: After a successful write to the partial dir, atomically rename into root_directory; keep file in partial dir only when transfer is interrupted/fails.
Regression test required (integration).
Resolved on
dev(HEADf7c6c91).Fixed on dev via fix/receiver-correctness (
14c064a): completed partial-dir writes are atomically renamed into the destination (file_rename_secure). Integration TestPartialDir added.CI run #461: all jobs green (lint, build-and-test, sanitizers address+undefined, fuzz-build, coverage, valgrind). Unit 25/25, integration 83 passed / 10 skipped / 1 xpassed. Closing.