lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 86ca5af 3/7: Fix defect introduced 20180228T1


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 86ca5af 3/7: Fix defect introduced 20180228T1615Z: bad output filename
Date: Thu, 14 Jun 2018 10:27:41 -0400 (EDT)

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

    Fix defect introduced 20180228T1615Z: bad output filename
    
    When this unreleased experimental code was introduced, the name of a
    pasted-out census file (assuming the spreadsheet extension is '.tsv')
    was formed thus:
      xyz.cns      --> xyz_pasted_out.tsv
    which wasn't egregious, except...
      client.1.cns --> client.tsv  ['.1' infix lost]
      client.2.cns --> client.tsv  [different input name, same output name]
    Moreover, infixes added to filenames elsewhere are dot-delimited:
      xyz.cns --> xyz.000000001.pdf
    and similarly for ".monthly_trace", ".quote", and ".roster". To follow
    the same pattern, the infix should begin with '.', not '_'.
    
    Fixed these defects in preparation for initial production release. The
    examples above now work appropriately:
      xyz.cns      --> xyz.pasted_out.tsv
      client.1.cns --> client.1.pasted_out.tsv
      client.2.cns --> client.2.pasted_out.tsv
---
 census_view.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/census_view.cpp b/census_view.cpp
index e6ca9d7..ed40088 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -1803,7 +1803,7 @@ void CensusView::DoPasteCensusOut() const
 {
     configurable_settings const& c = configurable_settings::instance();
     std::string const& e = c.spreadsheet_file_extension();
-    std::string const  f = fs::basename(base_filename()) + "_pasted_out";
+    std::string const  f = fs::basename(base_filename()) + ".pasted_out.cns";
     std::string file_name = unique_filepath(f, e).string();
     std::ofstream os(file_name.c_str(), ios_out_app_binary());
 



reply via email to

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