Skip to content

Commit

Permalink
Revision after reviewer's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stcui007 committed Jul 17, 2024
1 parent c829a5b commit 549628b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion include/realizations/catchment/Formulation_Manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "realizations/config/config.hpp"
#include "realizations/config/layer.hpp"

#include<iostream>

namespace realization {

class Formulation_Manager {
Expand Down Expand Up @@ -291,7 +293,15 @@ namespace realization {
*/
std::string get_output_root() const {
const auto output_root = this->tree.get_optional<std::string>("output_root");
const std::string str = *output_root;
std::string str;
if (output_root != boost::none && *output_root != "") {
// Check if the path ends with a trailing slash,
// otherwise add it.
str = output_root->back() == '/'
? *output_root
: *output_root + "/";
}

const char* dir = str.c_str();

//use C++ system function to check if there is a dir match that defined in realization
Expand Down

0 comments on commit 549628b

Please sign in to comment.