cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Why doesn't set CURLFTP_CREATE_DIR_RETRY when run “curl --ftp-create-dirs”

From: Leif W <warp9pnt9_at_gmail.com>
Date: Fri, 22 Apr 2016 05:03:54 -0400

On 2016-04-22 02:45, Daniel Stenberg wrote:
> Two alternatives we have are:
>
> 1. have --ftp-create-dirs set CURLOPT_FTP_CREATE_MISSING_DIRS to 2
> unconditionally

In which case, the patch would simply use 2L for the toggle true state,
and remain at 0L for the unused/disable state. Only affected users
would be those wanting to use create ftp dirs in sequential mode, where
now it will always allow MKD to fail once, then retry. Take slightly
longer to fail (a couple extra commands back and forth). But if it
fails twice, there's probably some external issue that would need to be
dealt with anyways (environment, permissions, auth, etc).

> 2. add a new option that can replace the existing one that allows you to
> set level, or possibly one that sets it to 2 and leave the original one
> set it it to 1.

Such as --ftp-create-dirs-level [0|1|2]... managing two sets of options
for the same simple thing, starts to feel a bit noisy.

> But I think (1) is fine enough and will hardly make many existing users
> cry.
>
> Or am I wrong?

Can't think of a simpler approach than (1) either. Can't think of a
situation where this potential for extra session chatter would cause any
problem on the edge of an edge case that would have any consequences
comparable to the larger issue of bad auth / bad permissions / etc. that
would otherwise be leading to CWD/MKD/CWD fails.

--Leif

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html

Received on 2016-04-22