mirror of
https://github.com/curl/curl.git
synced 2026-04-18 18:01:42 +03:00
curl: --continue-at is mutually exclusive with --no-clobber
Test 481 verifies Fixes #15645 Reported-by: Harry Sintonen Closes #15668
This commit is contained in:
parent
26ee83ab67
commit
ffbcde0022
5 changed files with 60 additions and 1 deletions
|
|
@ -1849,6 +1849,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
errorf(global, "--continue-at is mutually exclusive with --range");
|
||||
return PARAM_BAD_USE;
|
||||
}
|
||||
if(config->file_clobber_mode == CLOBBER_NEVER) {
|
||||
errorf(config->global,
|
||||
"--continue-at is mutually exclusive with --no-clobber");
|
||||
return PARAM_BAD_USE;
|
||||
}
|
||||
/* This makes us continue an ftp transfer at given position */
|
||||
if(strcmp(nextarg, "-")) {
|
||||
err = str2offset(&config->resume_from, nextarg);
|
||||
|
|
@ -2320,6 +2325,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
err = getstr(&config->output_dir, nextarg, DENY_BLANK);
|
||||
break;
|
||||
case C_CLOBBER: /* --clobber */
|
||||
if(config->use_resume && !toggle) {
|
||||
errorf(config->global,
|
||||
"--continue-at is mutually exclusive with --no-clobber");
|
||||
return PARAM_BAD_USE;
|
||||
}
|
||||
config->file_clobber_mode = toggle ? CLOBBER_ALWAYS : CLOBBER_NEVER;
|
||||
break;
|
||||
case C_OUTPUT: /* --output */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue