Skip to content

Commit

Permalink
Update util.cpp to avoid compiler warning and trow an error if a dire…
Browse files Browse the repository at this point in the history
…ctory cannot be created. (#282)
  • Loading branch information
andriish authored Feb 14, 2024
1 parent 2d4b1aa commit a7c4388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a7c4388

Please sign in to comment.