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

--etag-save doesn't respect --create-dirs #15730

Closed
tamird opened this issue Dec 12, 2024 · 3 comments
Closed

--etag-save doesn't respect --create-dirs #15730

tamird opened this issue Dec 12, 2024 · 3 comments

Comments

@tamird
Copy link

tamird commented Dec 12, 2024

I did this

$ curl -fSL --create-dirs --create-dirs --output-dir test/.tmp/debian-kernels/arm64 --remote-name-all --etag-compare test/.tmp/debian-kernels/arm64/linux-image-6.1.0-28-cloud-arm64-unsigned_6.1.119-1_arm64.deb.etag --etag-save test/.tmp/debian-kernels/arm64/linux-image-6.1.0-28-cloud-arm64-unsigned_6.1.119-1_arm64.deb.etag https://mirrors.wikimedia.org/debian/pool/main/l/linux/linux-image-6.1.0-28-cloud-arm64-unsigned_6.1.119-1_arm64.deb
Warning: Failed creating file for saving etags: "test/.tmp/debian-kernels/arm64/linux-image-6.1.0-28-cloud-arm64-unsigned_6.1.119-1_arm64.deb.etag". Skip this transfer
curl: no transfer performed

I expected the following

Success.

curl/libcurl version

curl 8.11.1 (aarch64-apple-darwin24.1.0) libcurl/8.11.1 OpenSSL/3.4.0 (SecureTransport) zlib/1.2.12 brotli/1.1.0 zstd/1.5.6 AppleIDN libssh2/1.11.1 nghttp2/1.64.0 librtmp/2.3
Release-Date: 2024-12-11
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

operating system

Darwin tamird-mac 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:45 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T8112 arm64

@bagder
Copy link
Member

bagder commented Dec 12, 2024

I will just mention that the documentation for --create-dirs explicitly says "When used in conjunction with the --output option", so it should not be a surprise and it is thus also not a bug.

Could still be worth supporting.

@tamird
Copy link
Author

tamird commented Dec 12, 2024

Eh. It's still a bug. First, create-dirs in practice works without --output if --remote-name or --remote-name-all is used. Second, even if you do use --output, the presence of --etag-save breaks the whole invocation, even when --output and --etag-save point to the same directory.

@bagder
Copy link
Member

bagder commented Dec 12, 2024

That's because you provide a path that can't be used.

bagder added a commit that referenced this issue Dec 12, 2024
Add test 693 to verify

Fixes #15730
Suggested-by: Tamir Duberstein
Closes #
@bagder bagder self-assigned this Dec 12, 2024
bagder added a commit that referenced this issue Dec 13, 2024
Add test 693 to verify

Fixes #15730
Suggested-by: Tamir Duberstein
Closes #15732
bagder added a commit that referenced this issue Dec 21, 2024
Add test 693 to verify

Fixes #15730
Suggested-by: Tamir Duberstein
Closes #15732
@bagder bagder closed this as completed in 31c6b50 Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants