]> git.mxchange.org Git - simgear.git/commitdiff
writePropeties(): create dir if necessary
authormfranz <mfranz>
Fri, 12 Jan 2007 21:24:50 +0000 (21:24 +0000)
committermfranz <mfranz>
Fri, 12 Jan 2007 21:24:50 +0000 (21:24 +0000)
simgear/props/props_io.cxx

index 45886a6cd4614e95f75ceccd84d85a6845c9988b..1b6e0f440c8d1e3304d6139df20095caeef259e3 100644 (file)
@@ -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);