From 7485160c9400a806a466f5aaf96ec0ae282b4247 Mon Sep 17 00:00:00 2001 From: andriish Date: Tue, 13 Feb 2024 13:03:32 +0100 Subject: [PATCH 1/2] Update util.cpp --- source/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/util.cpp b/source/util.cpp index ec9567c7..df455fa3 100644 --- a/source/util.cpp +++ b/source/util.cpp @@ -135,7 +135,7 @@ void update_source_file(std::string const &prefix, std::string const &file_name, // std::experimental::filesystem::create_directories(path); string command_line = "mkdir -p " + path; - system(command_line.c_str()); + if (system(command_line.c_str() != 0) throw std::runtime_error("ERROR: Command \"" + command_line + "\" failed"); string full_file_name = prefix + '/' + file_name; std::ifstream f(full_file_name); From 2e961fa78cf19e008e92962689bfd23a54d8b12a Mon Sep 17 00:00:00 2001 From: andriish Date: Tue, 13 Feb 2024 13:46:37 +0100 Subject: [PATCH 2/2] Update util.cpp --- source/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/util.cpp b/source/util.cpp index df455fa3..2b425a52 100644 --- a/source/util.cpp +++ b/source/util.cpp @@ -135,7 +135,7 @@ void update_source_file(std::string const &prefix, std::string const &file_name, // std::experimental::filesystem::create_directories(path); string command_line = "mkdir -p " + path; - if (system(command_line.c_str() != 0) throw std::runtime_error("ERROR: Command \"" + command_line + "\" failed"); + if (system(command_line.c_str()) != 0) throw std::runtime_error("ERROR: Command \"" + command_line + "\" failed"); string full_file_name = prefix + '/' + file_name; std::ifstream f(full_file_name);