diff options
-rw-r--r-- | lib/file.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/file.c b/lib/file.c index e9ed5b7f0..602299d01 100644 --- a/lib/file.c +++ b/lib/file.c @@ -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); |