aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/ftpgetresp.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/ftpgetresp.c')
-rw-r--r--docs/examples/ftpgetresp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c
index eb56e19d2..82b1d36a7 100644
--- a/docs/examples/ftpgetresp.c
+++ b/docs/examples/ftpgetresp.c
@@ -45,7 +45,7 @@ int main(int argc, char **argv)
if(curl) {
/* Get a file listing from sunet */
curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.sunet.se/");
- curl_easy_setopt(curl, CURLOPT_FILE, ftpfile);
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile);
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
res = curl_easy_perform(curl);