Title: CURLOPT_FTP_CREATE_MISSING_DIRS In File Upload
Tags: c++;ftp;libcurl
Question: I have this app that Uploads whole directory. I was thinking about doing recursive upload that I came about CURLOPT_FTP_CREATE_MISSING_DIRS. As far as I understood it, it will create missing norrisbrian@example.net.
Now suppose I have file url like ftp://ftp.example.com/public_html/mydir1/mydir2/file.php
Is it not supposed to create mydir1 and mydir2 before it uploads it? That is how I understood but my code does not work (perform returns CURLM_OK but no file is uploaded neither a directory created). Here i a relevant part. If am wrong (which I suspect to be the case), then any pointer to resolve my issue is welcomed.
for(int i=0; i<files.Count(); i++)
//formulate right URL
const char* uploadUrlCstr = fileUploadPath.c_str(); //processed url just like mentioned on post
struct stat file_info;
FILE* fd;
//open file and read it
fd = fopen(files[i].c_str(), "rb"); /* open file to upload */
if(!fd)
/* can't continue */
SendMessage(_("Cannot Open File\n %s\nUpload Terminated!")+path);
return ;
/* to get the file size */
if(fstat(fileno(fd), &amp;file_info) != 0)
/* can't continue */
SendMessage(_("Cannot Get File size\n %s\nUpload Terminated!")+path);
return ;
CURL* handle = curl_easy_init();
if(handle)
SetHandleOptions(handle); //set options
//do file upload here
/* upload to this place */
curl_easy_setopt(handle, CURLOPT_URL, uploadUrlCstr);
/* tell it to "upload" to the URL */
curl_easy_setopt(handle, CURLOPT_UPLOAD, 1L);
/* set where to read from (on Windows you need to use READFUNCTION too) */
curl_easy_setopt(handle, CURLOPT_READDATA, fd);
/* and give the size of the upload (optional) */
curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)file_info.st_size);
/* enable verbose for easier tracing */
curl_easy_setopt(handle, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(handle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L);
curl_multi_add_handle(multihandle, handle);
//store data
handleGarbage.push_back(handle); //store handles
fileObjects.push_back(fd); //store files
timesStructs.push_back(file_info); //store sizes
//fire upload all files
int total ;
CURLMcode code = curl_multi_perform(multihandle, &amp;total);//TODO 10 should come from config
if(code!=CURLM_OK)
SendMessage(wxString(curl_multi_strerror(code)), HERROR_TYPE_CRITICAL);
//clean handles messy
I have added the log here:
About to connect() to ftp.hosanna.site40.net port 21 (#33)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff78036150
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#34)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff78037d80
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#35)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff780399d0
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#36)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff7803b990
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#37)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff7803da70
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#38)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff78133660
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#39)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff78135a20
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#40)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff781382b0
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#41)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff7813ad40
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#42)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff7813da30
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#43)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff78140a20
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#44)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff78143c40
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#45)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff78147370
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#46)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff7814abd0
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#47)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff7814e520
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#48)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff781520d0
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#49)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff78155fa0
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 49 (0x7fff78155fa0) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#50)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff78159fa0
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 49 (0x7fff78155fa0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 50 (0x7fff78159fa0) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#51)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff7815e0d0
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 49 (0x7fff78155fa0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 50 (0x7fff78159fa0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 51 (0x7fff7815e0d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#52)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff78162900
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 49 (0x7fff78155fa0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 50 (0x7fff78159fa0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 51 (0x7fff7815e0d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 52 (0x7fff78162900) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#53)
[09:26:59]
Trying 151.154.11.224...
[09:26:59]
Adding handle: conn: 0x7fff781670f0
[09:26:59]
Adding handle: send: 0
[09:26:59]
Adding handle: recv: 0
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 49 (0x7fff78155fa0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 50 (0x7fff78159fa0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 51 (0x7fff7815e0d0) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 52 (0x7fff78162900) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 53 (0x7fff781670f0) send_pipe: 1, recv_pipe: 0
[09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
[09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#54)
[09:26:59]
Curl_addHandleToPipeline: length: 1
[09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
[09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
Comment: The verbose output should give you a useful clue about what's going on and what fails.

Comment: I have edited to add the logs

Comment: I cannot find anything ueful. Can you help me interpret it?

Here is the accepted answer: I changed whole design so that the question is somehow invalidated.
I no longer use the Loop but went for wxWidgets wxDir class especially its traversal.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 3, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2013:00:12/15/13', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<c++><ftp><libcurl>', 'Title': 'CURLOPT_FTP_CREATE_MISSING_DIRS In File Upload', 'ViewCount': 599, 'id': 20600458, 'user_AboutMe': "<p>Electronics, Telecommunications, and Software Engineer by professional, Husband and Father by Grace of God, Bond Servant of Jesus Christ by God's Grace.... Enjoying technology, loving my family, and Glorying in Jesus Christ!</p>\n", 'user_AccountId': 365002.0, 'user_DisplayName': 'Stefano Mtangoo', 'user_Reputation': 5667.0, 'user_Views': 1232.0, 'user_id': 709683.0}}