Fix retry on timeout

Don't delete the file on timeout
This commit is contained in:
Sude 2015-09-02 16:11:03 +03:00
parent b4fd9fcf5c
commit d8c66707cc

View File

@ -1335,7 +1335,7 @@ CURLcode Downloader::downloadFile(const std::string& url, const std::string& fil
fclose(outfile);
// Download failed and was not a resume attempt so delete the file
if (res != CURLE_OK && res != CURLE_PARTIAL_FILE && !bResume)
if (res != CURLE_OK && res != CURLE_PARTIAL_FILE && !bResume && res != CURLE_OPERATION_TIMEDOUT)
{
boost::filesystem::path path = filepath;
if (boost::filesystem::exists(path))