Only hash file if remote XML is available

This commit is contained in:
Ismo Toijala 2014-05-08 18:05:02 +02:00
parent d591f08acd
commit af45ca4092

View File

@ -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())
{