Skip to content
Snippets Groups Projects
Commit fd242e8d authored by Mohcine Chraibi's avatar Mohcine Chraibi
Browse files

create default Output directory

parent 8bc74683
Branches
No related tags found
1 merge request!10Resolve "Use Boost Directory Functionality"
Pipeline #14368 passed
......@@ -428,16 +428,19 @@ bool ArgumentParser::ParseIniFile(const string& inifile)
}
// output directory
_outputDir = GetProjectRootDir() + "Output/";
fs::path PathOutputDir(_outputDir);
if(xMainNode->FirstChild("output"))
{
_outputDir = xMainNode->FirstChildElement("output")->Attribute("location");
fs::path PathOutputDir(_outputDir); // todo: this is quick
PathOutputDir = _outputDir;
// todo: this is quick
// and dirty. waiting
// for MR 10 to
// generalize the use of boost:fs
if(_outputDir.empty())
{
_outputDir = GetProjectRootDir() + "/Output/";
_outputDir = GetProjectRootDir() + "Output/";
}
if (! PathOutputDir.is_absolute())
{
......@@ -445,6 +448,9 @@ bool ArgumentParser::ParseIniFile(const string& inifile)
PathOutputDir = _projectRootDir / PathOutputDir;
_outputDir = PathOutputDir.string();
}
}
else
Log->Write("INFO: \tDefault output directory");
if (!exists(PathOutputDir))
{
// does not exist yet. mkdir
......@@ -457,14 +463,7 @@ bool ArgumentParser::ParseIniFile(const string& inifile)
else
Log->Write("INFO: \tcreated directory <"+_outputDir+">");
}
else
{
Log->Write("INFO: \tOutput directory for results is:\t<"+_outputDir+">");
}
}
else{
// we should create output here not in the methods
}
//measurement area
if(xMainNode->FirstChild("measurement_areas"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment