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);