forked from lthn/blockchain
pre-download validation improved
This commit is contained in:
parent
70337d779d
commit
73c34713e3
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue