diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/function/generate.cc | 1 | ||||
-rw-r--r-- | src/function/write_file.cc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/function/generate.cc b/src/function/generate.cc index 4ece322..0c5c664 100644 --- a/src/function/generate.cc +++ b/src/function/generate.cc @@ -26,6 +26,7 @@ DomDocumentCache::document_ptr FunctionGenerate::constructDocument( ResultNodeFacade result(domDocument.get(), "generation"); result.setAttribute("path", targetPath.string()); + boost::filesystem::create_directories(targetPath.parent_path()); boost::filesystem::ofstream file(targetPath); if ( file.is_open() ) { diff --git a/src/function/write_file.cc b/src/function/write_file.cc index 06fdcfd..70412d7 100644 --- a/src/function/write_file.cc +++ b/src/function/write_file.cc @@ -24,6 +24,7 @@ bool serializeNodeToFile( if ( contentType != xalan::XalanNode::DOCUMENT_NODE && contentType != xalan::XalanNode::ATTRIBUTE_NODE ) { + boost::filesystem::create_directories(filePath.parent_path()); boost::filesystem::ofstream file(filePath); if ( file.is_open() ) { |