From 9d59b8f5cf29ea4691eb930cb34b30057d209325 Mon Sep 17 00:00:00 2001 From: Sude Date: Sat, 6 Apr 2013 19:35:20 +0300 Subject: [PATCH] Always close file in repair --- src/downloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/downloader.cpp b/src/downloader.cpp index fe0138f..7cc6b4b 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -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))