Download missing files when repairing with --repair --download

This commit is contained in:
Sude 2013-07-01 16:57:55 +03:00
parent b3792554bf
commit 7d24c589d2

View File

@ -781,6 +781,13 @@ int Downloader::repairFile(const std::string& url, const std::string& filepath,
else
{
std::cout << "File doesn't exist " << filepath << std::endl;
if (this->config.bDownload)
{
std::cout << "Downloading: " << filepath << std::endl;
CURLcode result = this->downloadFile(url, filepath, xml_data);
if (result == CURLE_OK)
res = 1;
}
return res;
}