curl_easy_setopt(transfer->handle, CURLOPT_DEBUGDATA, downloader->pakfire);
#endif
- // Limit protocols to HTTPS, HTTP, and FILE
+ // Limit protocols to HTTPS, HTTP, FTP and FILE
curl_easy_setopt(transfer->handle, CURLOPT_PROTOCOLS,
- CURLPROTO_HTTPS|CURLPROTO_HTTP|CURLPROTO_FILE);
+ CURLPROTO_HTTPS|CURLPROTO_HTTP|CURLPROTO_FTP|CURLPROTO_FILE);
// Reference back to this transfer
curl_easy_setopt(transfer->handle, CURLOPT_PRIVATE, transfer);
return 1;
}
break;
+
+ case CURLPROTO_FTP:
+ if (response_code == 226)
+ r = pakfire_transfer_save(downloader, transfer);
+ else
+ r = pakfire_transfer_fail(downloader, transfer, code);
+
+ return r;
}
// Success