lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 08215f3 2/5: Preserve old PDF implementation'


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 08215f3 2/5: Preserve old PDF implementation's default output directory
Date: Tue, 30 Jan 2018 19:47:36 -0500 (EST)

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

    Preserve old PDF implementation's default output directory
    
    Made the use of a distinctive directory conditional on testing.
---
 ledger_xsl.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ledger_xsl.cpp b/ledger_xsl.cpp
index bdbecb4..3d9543b 100644
--- a/ledger_xsl.cpp
+++ b/ledger_xsl.cpp
@@ -99,8 +99,14 @@ std::string write_ledger_as_pdf_via_xsl(Ledger const& 
ledger, fs::path const& fi
     throw_if_interdicted(ledger);
 
     fs::path print_dir(configurable_settings::instance().print_directory());
-    // Old implementation: write to a distinctive subdirectory.
-    print_dir = print_dir / "old";
+    if(global_settings::instance().ash_nazg())
+        {
+        // Old implementation: write to a distinctive subdirectory,
+        // but only for testing. For production (until the new PDF
+        // implementation is accepted), keep the old behavior (i.e.,
+        // don't execute this line).
+        print_dir = print_dir / "old";
+        }
 
     fs::path real_filepath(orthodox_filename(filepath.leaf()));
     LMI_ASSERT(fs::portable_name(real_filepath.string()));



reply via email to

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