[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6095] Clean up .fo.xml files created during PDF generatio
From: |
Greg Chicares |
Subject: |
[lmi-commits] [6095] Clean up .fo.xml files created during PDF generation |
Date: |
Fri, 23 Jan 2015 03:02:41 +0000 |
Revision: 6095
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6095
Author: chicares
Date: 2015-01-23 03:02:40 +0000 (Fri, 23 Jan 2015)
Log Message:
-----------
Clean up .fo.xml files created during PDF generation
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/wx_test_pdf_create.cpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2015-01-23 02:56:35 UTC (rev 6094)
+++ lmi/trunk/ChangeLog 2015-01-23 03:02:40 UTC (rev 6095)
@@ -35575,3 +35575,9 @@
Use output_pdf_existence_checker helper in PDF creation test. See:
http://lists.nongnu.org/archive/html/lmi/2014-12/msg00089.html
+20150123T0302Z <address@hidden> [516]
+
+ wx_test_pdf_create.cpp
+Clean up .fo.xml files created during PDF generation. See:
+ http://lists.nongnu.org/archive/html/lmi/2014-12/msg00089.html
+
Modified: lmi/trunk/wx_test_pdf_create.cpp
===================================================================
--- lmi/trunk/wx_test_pdf_create.cpp 2015-01-23 02:56:35 UTC (rev 6094)
+++ lmi/trunk/wx_test_pdf_create.cpp 2015-01-23 03:02:40 UTC (rev 6095)
@@ -61,7 +61,9 @@
// Specialized version of output_file_existence_checker for the output PDF
// files: it takes just the base name of the file, without neither the
-// directory part nor the .pdf extension, in its ctor.
+// directory part nor the .pdf extension, in its ctor and also takes care of
+// deleting the .fo.xml created as a side effect of PDF generation when the PDF
+// file itself is removed.
class output_pdf_existence_checker :public output_file_existence_checker
{
public:
@@ -69,9 +71,28 @@
:output_file_existence_checker
(make_full_print_path(base_name + ".pdf")
)
+ ,fo_xml_path_
+ (make_full_print_path(base_name + ".fo.xml")
+ )
{
+ // We do not remove .fo.xml file here, this is unnecessary as we don't
+ // particularly care whether it exists or not because we never check
+ // for its existence.
}
+ ~output_pdf_existence_checker()
+ {
+ // Do remove the .fo.xml file to avoid littering the print directory
+ // with the files generated during the test run.
+ try
+ {
+ fs::remove(fo_xml_path_);
+ }
+ catch(...)
+ {
+ }
+ }
+
private:
// Return the full path in the print directory for the file with the given
// leaf name.
@@ -81,6 +102,8 @@
p /= leaf;
return p;
}
+
+ fs::path fo_xml_path_;
};
} // Unnamed namespace.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6095] Clean up .fo.xml files created during PDF generation,
Greg Chicares <=