[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());
- [lmi-commits] [lmi] master updated (d17155c -> 73aeadc), Greg Chicares, 2018/06/14
- [lmi-commits] [lmi] master 8a722b3 2/7: Refactor for concision, Greg Chicares, 2018/06/14
- [lmi-commits] [lmi] master 8044c50 1/7: Remove scaffolding, Greg Chicares, 2018/06/14
- [lmi-commits] [lmi] master 15098dd 4/7: Rename icons paste-case*.png --> paste-in*.png, Greg Chicares, 2018/06/14
- [lmi-commits] [lmi] master 86ca5af 3/7: Fix defect introduced 20180228T1615Z: bad output filename,
Greg Chicares <=
- [lmi-commits] [lmi] master a22db84 6/7: Add census-paste-out commands to menu and toolbar, Greg Chicares, 2018/06/14
- [lmi-commits] [lmi] master 73aeadc 7/7: Remove no-longer-needed 'pyx=paste_out_to_spreadsheet' option, Greg Chicares, 2018/06/14
- [lmi-commits] [lmi] master f964241 5/7: Adjust census-pasting XRCIDs, Greg Chicares, 2018/06/14