Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: Avoiding overwriting a symlinked target
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Paul Gilmartin via curl-users <curl-users_at_lists.haxx.se>
Date: Sat, 1 Jan 2022 14:54:25 -0700
On Jan 1, 2022, at 13:50:18, Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se> wrote:
>
> On Thu, 30 Dec 2021, Dirk Fieldhouse via curl-users wrote:
>
>> Would curl be open to accepting a --unlink (or similar) option that would cause a to-be-clobbered file to be unlinked rather than overwritten directly (obviously only for OS/FS combinations where that makes sense)?
>
> Why should curl remove the file when you can just do it yourself before invoking curl?
>
This may not be obvious with "-J, --remote-header-name". (I read the warnings.)
What happens if the user specifies two or more of:
--remote-header-name
--remote-name
--output
o Syntax error?
o Last one wins?
o Dominant (which) one wins?
And I've been wishing for a "--dry-run" option": tell me what curl intends
to do, but don't actually do it, so I'll know what filename to use for
"--time-cond <file>". I'm working on parsing the output of "--head"
to do that.
(Earler in this thread, I misplaced a "/". Muphry's Law.)
Thanks
gil
Date: Sat, 1 Jan 2022 14:54:25 -0700
On Jan 1, 2022, at 13:50:18, Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se> wrote:
>
> On Thu, 30 Dec 2021, Dirk Fieldhouse via curl-users wrote:
>
>> Would curl be open to accepting a --unlink (or similar) option that would cause a to-be-clobbered file to be unlinked rather than overwritten directly (obviously only for OS/FS combinations where that makes sense)?
>
> Why should curl remove the file when you can just do it yourself before invoking curl?
>
This may not be obvious with "-J, --remote-header-name". (I read the warnings.)
What happens if the user specifies two or more of:
--remote-header-name
--remote-name
--output
o Syntax error?
o Last one wins?
o Dominant (which) one wins?
And I've been wishing for a "--dry-run" option": tell me what curl intends
to do, but don't actually do it, so I'll know what filename to use for
"--time-cond <file>". I'm working on parsing the output of "--head"
to do that.
(Earler in this thread, I misplaced a "/". Muphry's Law.)
Thanks
gil
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2022-01-01