From 7a360de49d0ecfef683c4459450718b5283115d6 Mon Sep 17 00:00:00 2001 From: James Housley Date: Tue, 26 Jun 2007 20:23:10 +0000 Subject: The results for a list only directory should be sent to the callback --- lib/ssh.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/ssh.c b/lib/ssh.c index 7993e12d3..7e42b2249 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -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; -- cgit v1.2.3