From: mfranz Date: Fri, 12 Jan 2007 21:24:50 +0000 (+0000) Subject: writePropeties(): create dir if necessary X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=de6b32d8c667bd3cd01e6163202b87bc16f31c19;p=simgear.git writePropeties(): create dir if necessary --- diff --git a/simgear/props/props_io.cxx b/simgear/props/props_io.cxx index 45886a6c..1b6e0f44 100644 --- a/simgear/props/props_io.cxx +++ b/simgear/props/props_io.cxx @@ -540,6 +540,9 @@ void writeProperties (const string &file, const SGPropertyNode * start_node, bool write_all, SGPropertyNode::Attribute archive_flag) { + SGPath path(file.c_str()); + path.create_dir(0777); + ofstream output(file.c_str()); if (output.good()) { writeProperties(output, start_node, write_all, archive_flag);