mirror of
https://github.com/curl/curl.git
synced 2026-08-26 19:03:32 +03:00
Dominick Meglio implemented CURLOPT_MAXFILESIZE and --max-filesize.
This commit is contained in:
parent
94568f884d
commit
ce5db9a86e
11 changed files with 60 additions and 7 deletions
|
|
@ -1777,8 +1777,13 @@ CURLcode Curl_ftp_nextconnect(struct connectdata *conn)
|
|||
downloads and when talking to servers that don't give away the size
|
||||
in the RETR response line. */
|
||||
result = ftp_getsize(conn, ftp->file, &foundsize);
|
||||
if(CURLE_OK == result)
|
||||
if(CURLE_OK == result) {
|
||||
if (data->set.max_filesize && foundsize > data->set.max_filesize) {
|
||||
failf(data, "Maximum file size exceeded");
|
||||
return CURLE_FILESIZE_EXCEEDED;
|
||||
}
|
||||
downloadsize = foundsize;
|
||||
}
|
||||
|
||||
if(conn->resume_from) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue