fix(cli): --partial-dir implies --partial (rsync parity)
rsync 3.4.1 resolves --partial-dir after option parsing and sets keep_partial, so --partial-dir=DIR alone retains an interrupted transfer's partial file. FastSync only used the partial dir when --partial was also given, silently discarding it otherwise. Set Config->partial in cli_finalize_config whenever partial_dir is set. Following rsync, an explicit --no-partial does NOT win (verified on rsync 3.4.1 in either option order); --inplace is guarded because it writes the destination in place with no partial staging. Tests: CLI unit coverage for the implication/precedence/inplace guard, and a deterministic integration case that blocks the final install (non-empty directory at the destination) and asserts the staged partial survives under --partial-dir alone.
This commit is contained in:
+1
-1
@@ -288,7 +288,7 @@ void print_usage(void) {
|
||||
printf(" --log-file <path>, --log-file=<path> Write log messages to file\n");
|
||||
printf(" --stderr=MODE Route logging to stderr: errors or all\n");
|
||||
printf(" --partial Keep partial files on interrupted transfer\n");
|
||||
printf(" --partial-dir <dir> Directory for partial files\n");
|
||||
printf(" --partial-dir <dir> Directory for partial files (implies --partial)\n");
|
||||
printf(" -T, --temp-dir <dir> Scratch dir for temp files before atomic install.\n");
|
||||
printf(" Confined to the receive root: a relative dir resolves below\n");
|
||||
printf(" it and an absolute/traversal dir is rejected. The dir must\n");
|
||||
|
||||
Reference in New Issue
Block a user