From ca97148827eb870afc8b90471462a4181a82ad7b Mon Sep 17 00:00:00 2001 From: Sude Date: Mon, 29 Feb 2016 03:15:53 +0200 Subject: [PATCH] Make sure that file exists before trying to automatically create xml data in Downloader::getLocalFileHash --- src/downloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/downloader.cpp b/src/downloader.cpp index 65c9f5b..8948838 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -2877,7 +2877,7 @@ std::string Downloader::getLocalFileHash(const std::string& filepath, const std: else 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; Util::createXML(filepath, config.iChunkSize, xml_directory);