Always close file in repair

This commit is contained in:
Sude 2013-04-06 19:35:20 +03:00
parent cfbc61d1f7
commit 9d59b8f5cf

View File

@ -657,9 +657,9 @@ int Downloader::repairFile(std::string url, std::string filepath, std::string xm
{
std::cout << "Filesizes don't match" << std::endl
<< "Incomplete download or different version" << std::endl;
fclose(outfile);
if (this->config.bDownload)
{
fclose(outfile);
std::cout << "Redownloading file" << std::endl;
boost::filesystem::path path = filepath;
if (!boost::filesystem::remove(path))