Skip to content

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

Closed

Description

@hgdagon

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.

Activity

  1. self-assigned this
    on Jan 1, 2024
  2. added a commit that references this issue on Jan 28, 2024
    941b56d
  3. Montg0mery commented on Sep 18, 2024

    @Montg0mery

    Just to help anyone else searching: this is actually only when --remote-header-name is also included.

    The error I was getting was:

    Warning: Failed to set filetime 1571296705 on 'foo.iso': No such file or 
    Warning: directory
    

    If you only used the two options in this issue title, it worked fine. It was the combination of all three that caused the issue (--remote-header-name, --remote-time and --output-dir).

    It was fixed in curl 8.6.0 (thanks!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions