diff options
author | James Housley <jim@thehousleys.net> | 2007-06-26 20:23:10 +0000 |
---|---|---|
committer | James Housley <jim@thehousleys.net> | 2007-06-26 20:23:10 +0000 |
commit | 7a360de49d0ecfef683c4459450718b5283115d6 (patch) | |
tree | a4f06b0fc2e6640e8b63f1d90f9bd1000d915198 /lib | |
parent | 1be45576943b23e111481859076a131c25c8b8c2 (diff) |
The results for a list only directory should be sent to the callback
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh.c | 9 |
1 files changed, 8 insertions, 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; |