mirror of
https://github.com/curl/curl.git
synced 2026-07-26 01:27:15 +03:00
ftp: add 'list_only' to the transfer state struct
and rename it from 'ftp_list_only' since it is also used for SSH and POP3. The state is updated internally for 'type=D' FTP URLs. Added test case 1570 to verify. Closes #6578
This commit is contained in:
parent
115c9e27f5
commit
528f71c2ec
10 changed files with 87 additions and 12 deletions
|
|
@ -1413,7 +1413,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
sshc->readdir_longentry = sshc->readdir_attrs->longname;
|
||||
sshc->readdir_len = strlen(sshc->readdir_filename);
|
||||
|
||||
if(data->set.ftp_list_only) {
|
||||
if(data->set.list_only) {
|
||||
char *tmpLine;
|
||||
|
||||
tmpLine = aprintf("%s\n", sshc->readdir_filename);
|
||||
|
|
|
|||
|
|
@ -2143,7 +2143,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
readdir_len = (size_t) rc;
|
||||
sshp->readdir_filename[readdir_len] = '\0';
|
||||
|
||||
if(data->set.ftp_list_only) {
|
||||
if(data->set.list_only) {
|
||||
result = Curl_client_write(data, CLIENTWRITE_BODY,
|
||||
sshp->readdir_filename,
|
||||
readdir_len);
|
||||
|
|
|
|||
|
|
@ -859,7 +859,7 @@ static CURLcode wssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
result = CURLE_OK;
|
||||
while(name) {
|
||||
char *line = aprintf("%s\n",
|
||||
data->set.ftp_list_only ?
|
||||
data->set.list_only ?
|
||||
name->fName : name->lName);
|
||||
if(line == NULL) {
|
||||
state(data, SSH_SFTP_CLOSE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue