lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master e919238 1/2: Explicitly create subdirectory f


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e919238 1/2: Explicitly create subdirectory for "old" XSL-generated output
Date: Wed, 31 Jan 2018 17:20:46 -0500 (EST)

branch: master
commit e919238b865059fe91a5b82aa85eee0538dff924
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Explicitly create subdirectory for "old" XSL-generated output
    
    Formerly, if this subdirectory didn't already exist, the old XSL code
    couldn't write its output files at all.
---
 ledger_xsl.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ledger_xsl.cpp b/ledger_xsl.cpp
index 3d9543b..c6c583b 100644
--- a/ledger_xsl.cpp
+++ b/ledger_xsl.cpp
@@ -32,6 +32,7 @@
 #include "path_utility.hpp"
 #include "system_command.hpp"
 
+#include <boost/filesystem/convenience.hpp> // create_directories()
 #include <boost/filesystem/fstream.hpp>
 #include <boost/filesystem/operations.hpp>
 
@@ -106,6 +107,7 @@ std::string write_ledger_as_pdf_via_xsl(Ledger const& 
ledger, fs::path const& fi
         // implementation is accepted), keep the old behavior (i.e.,
         // don't execute this line).
         print_dir = print_dir / "old";
+        fs::create_directories(print_dir);
         }
 
     fs::path real_filepath(orthodox_filename(filepath.leaf()));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]