mirror of
https://github.com/curl/curl.git
synced 2026-07-22 21:57:20 +03:00
The results for a list only directory should be sent to the callback
This commit is contained in:
parent
1be4557694
commit
7a360de49d
1 changed files with 8 additions and 1 deletions
|
|
@ -1487,7 +1487,14 @@ CURLcode Curl_sftp_do(struct connectdata *conn, bool *done)
|
|||
filename[len] = '\0';
|
||||
|
||||
if (data->set.ftp_list_only) {
|
||||
infof(data, "%s\n", filename);
|
||||
char *tmpLine;
|
||||
|
||||
tmpLine = aprintf("%s\n", filename);
|
||||
if (tmpLine == NULL) {
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
result = Curl_client_write(conn, CLIENTWRITE_BODY, tmpLine, 0);
|
||||
Curl_safefree(tmpLine);
|
||||
}
|
||||
else {
|
||||
totalLen = 80 + len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue