Make sure that file exists before trying to automatically create xml data in Downloader::getLocalFileHash

This commit is contained in:
Sude 2016-02-29 03:15:53 +02:00
parent 21555b19f3
commit ca97148827

View File

@ -2877,7 +2877,7 @@ std::string Downloader::getLocalFileHash(const std::string& filepath, const std:
else else
local_xml_file = config.sXMLDirectory + "/" + path.filename().string() + ".xml"; local_xml_file = config.sXMLDirectory + "/" + path.filename().string() + ".xml";
if (config.bAutomaticXMLCreation && !boost::filesystem::exists(local_xml_file)) if (config.bAutomaticXMLCreation && !boost::filesystem::exists(local_xml_file) && boost::filesystem::exists(path))
{ {
std::string xml_directory = config.sXMLDirectory + "/" + gamename; std::string xml_directory = config.sXMLDirectory + "/" + gamename;
Util::createXML(filepath, config.iChunkSize, xml_directory); Util::createXML(filepath, config.iChunkSize, xml_directory);