Skip to content
Snippets Groups Projects
Commit b462d6af authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Resolve "FileLoader should try harder"

parent 0efeac38
No related branches found
No related tags found
1 merge request!298Resolve "FileLoader should try harder"
...@@ -189,8 +189,8 @@ static Ref_t create_field_map_brbz(Detector & /*lcdd*/, xml::Handle_t handle) ...@@ -189,8 +189,8 @@ static Ref_t create_field_map_brbz(Detector & /*lcdd*/, xml::Handle_t handle)
if( !fs::exists(fs::path(field_map_file)) ) { if( !fs::exists(fs::path(field_map_file)) ) {
auto ret = std::system(("mkdir -p fieldmaps && " auto ret = std::system(("mkdir -p fieldmaps && "
"wget " + "curl --retry 5 -f " +
field_map_url + " -O " + field_map_file).c_str()); field_map_url + " -o " + field_map_file).c_str());
if (!fs::exists(fs::path(field_map_file))) { if (!fs::exists(fs::path(field_map_file))) {
std::cerr << "ERROR: file, " << field_map_file << ", does not exist\n"; std::cerr << "ERROR: file, " << field_map_file << ", does not exist\n";
......
...@@ -38,7 +38,7 @@ long load_file( ...@@ -38,7 +38,7 @@ long load_file(
if (!fs::exists(fs::path(file))) { if (!fs::exists(fs::path(file))) {
std::string parent_path = fs::path(file).parent_path(); std::string parent_path = fs::path(file).parent_path();
auto ret = std::system(("mkdir -p " + parent_path + " && " auto ret = std::system(("mkdir -p " + parent_path + " && "
"wget " + url + " -O " + file).c_str()); "curl --retry 5 -f " + url + " -o " + file).c_str());
if (!fs::exists(fs::path(file))) { if (!fs::exists(fs::path(file))) {
std::cerr << "ERROR: file, " << file << ", does not exist\n"; std::cerr << "ERROR: file, " << file << ", does not exist\n";
std::quick_exit(1); std::quick_exit(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment