diff --git a/lib/ftp.c b/lib/ftp.c index b3dbb0735..8c6f465eb 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -1829,7 +1829,7 @@ CURLcode Curl_ftp_nextconnect(struct connectdata *conn) conn->maxdownload); } infof(data, "range-download from %d to %d, totally %d bytes\n", - from, to, totalsize); + from, to, conn->maxdownload); ftp->dont_check = TRUE; /* dont check for successful transfer */ } @@ -2041,6 +2041,9 @@ CURLcode Curl_ftp_nextconnect(struct connectdata *conn) return result; } + if(size > conn->maxdownload) + size = conn->size = conn->maxdownload; + infof(data, "Getting file with size: %d\n", size); /* FTP download: */