Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behaviour when mixing --continue-at with --no-clobber or --remove-on-error #15645

Closed
piru opened this issue Nov 26, 2024 · 3 comments
Assignees

Comments

@piru
Copy link

piru commented Nov 26, 2024

I did this

$ echo plop > robots.txt
$ curl --no-clobber -C 1 -O https://curl.se/robots.txt

The downloaded content is appended torobots.txt file.

and

echo plop > important
curl --remove-on-error -C 1 -o important https://nonexisting.curl.se/

The file important is removed.

I expected the following

Curl should likely report and error instead of behaving inconsistently, or the documentation should be improved to mention the behaviour in these scenarios.

curl/libcurl version

8.11.0

operating system

Any

@bagder bagder self-assigned this Dec 2, 2024
@bagder
Copy link
Member

bagder commented Dec 2, 2024

In the first case with --no-clobber and --continue-at, what could the user possibly want to happen? Is there a legit use case there? Should we make it simple and just deny that option combination?

@icing
Copy link
Contributor

icing commented Dec 2, 2024

Since these options are fairly new, I think denying it makes sense.

@piru
Copy link
Author

piru commented Dec 2, 2024

I think erroring out is the correct thing to do.

bagder added a commit that referenced this issue Dec 2, 2024
Test 481 verifies

Fixes #15645
Reported-by: Harry Sintonen
bagder added a commit that referenced this issue Dec 2, 2024
Test 482 verifies

Fixes #15645
Reported-by: Harry Sintonen
@bagder bagder closed this as completed in ffbcde0 Dec 2, 2024
bagder added a commit that referenced this issue Dec 2, 2024
Test 482 verifies

Fixes #15645
Reported-by: Harry Sintonen
Closes #15668
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants