[cig-commits] commit: Create output directory if needed to store converted xml in json_parser
Mercurial
hg at geodynamics.org
Wed Nov 9 15:09:29 PST 2011
changeset: 396:3ebd93999f49
user: Walter Landry <wlandry at caltech.edu>
date: Wed Nov 09 15:08:23 2011 -0800
files: json_parser/parse_json.cxx
description:
Create output directory if needed to store converted xml in json_parser
diff -r eba722012425 -r 3ebd93999f49 json_parser/parse_json.cxx
--- a/json_parser/parse_json.cxx Tue Nov 08 15:11:21 2011 -0800
+++ b/json_parser/parse_json.cxx Wed Nov 09 15:08:23 2011 -0800
@@ -30,6 +30,8 @@ boost::filesystem::path parse_json(const
throw
std::runtime_error("The field 'outputPath' must be a string");
xml_name=i->value_.get_str() / xml_name;
+ if(!boost::filesystem::exists(i->value_.get_str()))
+ boost::filesystem::create_directories(i->value_.get_str());
break;
}
}
More information about the CIG-COMMITS
mailing list