writePropeties(): create dir if necessary
This commit is contained in:
@@ -540,6 +540,9 @@ void
|
|||||||
writeProperties (const string &file, const SGPropertyNode * start_node,
|
writeProperties (const string &file, const SGPropertyNode * start_node,
|
||||||
bool write_all, SGPropertyNode::Attribute archive_flag)
|
bool write_all, SGPropertyNode::Attribute archive_flag)
|
||||||
{
|
{
|
||||||
|
SGPath path(file.c_str());
|
||||||
|
path.create_dir(0777);
|
||||||
|
|
||||||
ofstream output(file.c_str());
|
ofstream output(file.c_str());
|
||||||
if (output.good()) {
|
if (output.good()) {
|
||||||
writeProperties(output, start_node, write_all, archive_flag);
|
writeProperties(output, start_node, write_all, archive_flag);
|
||||||
|
|||||||
Reference in New Issue
Block a user