cURL / Mailing Lists / curl-users / Single Mail


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

From: Leif W <>
Date: Fri, 22 Apr 2016 00:34:02 -0400

On 2016-04-21 23:52, Leif W wrote:
> Anyways, attached is an UNTESTED patch (diff -u), for discussion. It

Naturally, despite considering the patch for quite a long time, after I
send it, I immediately spot a problem that seems completely obvious. :)

+ } else if(curlx_strequal(nextarg, "-")) {

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.

+ } else if(nextarg == NULL || curlx_strequal(nextarg, "-")) {

Also changed to use str2unum to let that give BAD_NUMERIC or
BAD_NEGATIVE_NUMERIC, included error message and threw BAD_PARAM instead
of BAD_NUMERIC, to try to be more clear about what the problem was, if any.


List admin:

Received on 2016-04-22