Skip to content
Snippets Groups Projects
Commit 90903742 authored by Tom Fischer's avatar Tom Fischer
Browse files

Merge branch 'mkdir-out' into 'master'

[cli] Create output directory.

See merge request ogs/ogs!4989
parents aa6a490b 838d0ea4
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@
#include <tclap/CmdLine.h>
#include <chrono>
#include <filesystem>
#include <sstream>
#include "CommandLineArgumentParser.h"
......@@ -64,6 +65,20 @@ int main(int argc, char* argv[])
INFO("This is OpenGeoSys-6 version {:s}.",
GitInfoLib::GitInfo::ogs_version);
{
std::error_code mkdir_err;
if (std::filesystem::create_directories(cli_arg.outdir, mkdir_err))
{
INFO("Output directory {:s} created.", cli_arg.outdir);
}
else if (mkdir_err.value() != 0)
{
WARN(
"Could not create output directory {:s}. Error code {:d}, {:s}",
cli_arg.outdir, mkdir_err.value(), mkdir_err.message());
}
}
BaseLib::RunTime run_time;
{
......
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