From 73c34713e3172f8eec40f1996adc2fe9eab303cc Mon Sep 17 00:00:00 2001 From: sowle Date: Fri, 13 Mar 2020 07:44:03 +0300 Subject: [PATCH] pre-download validation improved --- src/common/pre_download.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/pre_download.h b/src/common/pre_download.h index 210d4041..aa1a2c6f 100644 --- a/src/common/pre_download.h +++ b/src/common/pre_download.h @@ -80,7 +80,7 @@ namespace tools }; tools::create_directories_if_necessary(working_folder); - bool r = cl.download_and_unzip(cb, downloading_file_path, url, 1000 /* timout */); + bool r = cl.download_and_unzip(cb, downloading_file_path, url, 1000 /* timout */, "GET", std::string(), 3 /* fails count */); if (!r) { LOG_PRINT_RED("Download failed", LOG_LEVEL_0); @@ -212,6 +212,12 @@ namespace tools target_core.deinit(); source_core.deinit(); + boost::filesystem::remove_all(path_to_temp_datafolder, ec); + if (ec) + { + LOG_ERROR("Failed to remove all from " << path_to_temp_datafolder); + } + return true; } }