From af45ca4092675fd883a46f2f97ad0ab2c68f1633 Mon Sep 17 00:00:00 2001 From: Ismo Toijala Date: Thu, 8 May 2014 18:05:02 +0200 Subject: [PATCH] Only hash file if remote XML is available --- src/downloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/downloader.cpp b/src/downloader.cpp index 9d01824..d9dad4f 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -878,10 +878,10 @@ CURLcode Downloader::downloadFile(const std::string& url, const std::string& fil bool bSameVersion = true; // assume same version bool bLocalXMLExists = boost::filesystem::exists(local_xml_file); // This is additional check to see if remote xml should be saved to speed up future version checks - std::string localHash = this->getLocalFileHash(filepath, gamename); if (!xml_data.empty()) { + std::string localHash = this->getLocalFileHash(filepath, gamename); // Do version check if local hash exists if (!localHash.empty()) {