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

--remote-time (-R) doesn't work with --output-dir #12614

Closed
hgdagon opened this issue Jan 1, 2024 · 0 comments
Closed

--remote-time (-R) doesn't work with --output-dir #12614

hgdagon opened this issue Jan 1, 2024 · 0 comments
Assignees

Comments

@hgdagon
Copy link

hgdagon commented Jan 1, 2024

I did this

curl --create-dirs -JRO --output-dir "some/path/" "https://someurl.com/somefile/download"

I expected the following

The file to be created at some/path with the remote timestamp set

curl/libcurl version

curl 8.5.0 (x86_64-pc-cygwin) libcurl/8.5.0 OpenSSL/3.2.0 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.11.0 nghttp2/1.58.0
Release-Date: 2023-12-06
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

operating system

Windows. curl download from MSYS2's MinGW64 repository.

@bagder bagder self-assigned this Jan 1, 2024
bagder added a commit that referenced this issue Jan 2, 2024
When Content-Disposition parsing is used and an output dir is prepended,
make sure to store that new file name correctly so that it can be used
for setting the file timestamp when --remote-time is used.

Extended test 3012 to verify.

Reported-by: hgdagon on github
Fixes #12614
bagder added a commit that referenced this issue Jan 2, 2024
When Content-Disposition parsing is used and an output dir is prepended,
make sure to store that new file name correctly so that it can be used
for setting the file timestamp when --remote-time is used.

Extended test 3012 to verify.

Co-Authored-by: Jay Satiro
Reported-by: hgdagon on github
Fixes #12614
@bagder bagder closed this as completed in 941b56d Jan 2, 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