From a183bb59e6709d8f9393f1d86b30cc825a0740c2 Mon Sep 17 00:00:00 2001 From: Sude Date: Wed, 4 Sep 2013 21:03:43 +0300 Subject: [PATCH] Allow automatic xml creation durring --repair --download --- src/downloader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/downloader.cpp b/src/downloader.cpp index d655941..99d4412 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -841,7 +841,14 @@ int Downloader::repairFile(const std::string& url, const std::string& filepath, std::cout << "Downloading: " << filepath << std::endl; CURLcode result = this->downloadFile(url, filepath, xml_data); if (result == CURLE_OK) + { + if (config.sXMLFile == "automatic" && bParsingFailed) + { + std::cout << "Starting automatic XML creation" << std::endl; + Util::createXML(filepath, config.iChunkSize, config.sXMLDirectory); + } res = 1; + } } return res; }