mirror of
https://github.com/curl/curl.git
synced 2025-09-18 10:02:45 +03:00
provide an error string when resuming fails - and use the proper error code,
not the former one
This commit is contained in:
parent
bd2db87237
commit
1b8ac7c6b5
|
@ -340,12 +340,12 @@ CURLcode Curl_file(struct connectdata *conn)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Added by Dolbneff A.V & Spiridonoff A.V */
|
|
||||||
if (conn->resume_from <= expected_size)
|
if (conn->resume_from <= expected_size)
|
||||||
expected_size -= conn->resume_from;
|
expected_size -= conn->resume_from;
|
||||||
else
|
else {
|
||||||
/* Is this error code suitable in such situation? */
|
failf(data, "failed to resume file:// transfer");
|
||||||
return CURLE_FTP_BAD_DOWNLOAD_RESUME;
|
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||||
|
}
|
||||||
|
|
||||||
if (fstated && (expected_size == 0))
|
if (fstated && (expected_size == 0))
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user