From f12fc4066e35b34d3ff504842bcbf513256c52ec Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 23 Jul 2014 19:07:28 +0200 Subject: Added directory creation to FunctionGenerate and FunctionWriteFile * i.e. they now create the directory tree required to contain their respective output files automatically * this is needed so TestXSLT is able to create the target directory implicitly --- src/function/generate.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/function/generate.cc') 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() ) { -- cgit v1.2.3