From de6b32d8c667bd3cd01e6163202b87bc16f31c19 Mon Sep 17 00:00:00 2001 From: mfranz Date: Fri, 12 Jan 2007 21:24:50 +0000 Subject: [PATCH] writePropeties(): create dir if necessary --- simgear/props/props_io.cxx | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.39.5