mirror of
https://github.com/curl/curl.git
synced 2025-03-19 15:40:42 +08:00
use the return code from lseek() to detect problems and bail out if so
This commit is contained in:
parent
94095c61d8
commit
a8996b9e52
@ -367,8 +367,11 @@ CURLcode Curl_file(struct connectdata *conn, bool *done)
|
||||
if(fstated)
|
||||
Curl_pgrsSetDownloadSize(data, expected_size);
|
||||
|
||||
if(data->reqdata.resume_from)
|
||||
lseek(fd, data->reqdata.resume_from, SEEK_SET);
|
||||
if(data->reqdata.resume_from) {
|
||||
if(data->reqdata.resume_from !=
|
||||
lseek(fd, data->reqdata.resume_from, SEEK_SET))
|
||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||
}
|
||||
|
||||
Curl_pgrsTime(data, TIMER_STARTTRANSFER);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user