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: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 22 Apr 2016 08:45:41 +0200 (CEST)

On Fri, 22 Apr 2016, Leif W wrote:

> This assumes there will always be a nextarg, but there may well not be.
> The result should be the same for both cases, so this should be an || and
> check if nextarg is NULL or starts with "-", both indicate that there is no
> [num] option to get.

That's not good enough either. We simply cannot have command line options that
have an optional argument. And since --ftp-create-dirs never had one before,
we can't add one now.

Two alternatives we have are:

1. have --ftp-create-dirs set CURLOPT_FTP_CREATE_MISSING_DIRS to 2
unconditionally

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.

But I think (1) is fine enough and will hardly make many existing users cry.

Or am I wrong?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
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