Commit 05f2d8560c4f1ea12a0ad99d3785389cd3f5d311
1 parent
35fde2f4
Exists in
master
and in
96 other branches
Remove original files after compression
Showing
2 changed files
with
4 additions
and
0 deletions
Show diff stats
src/PostProcessing/ArchiveWriter.cc
... | ... | @@ -160,6 +160,7 @@ std::string ArchiveWriter::createArchive(const Formats& pFormat, |
160 | 160 | |
161 | 161 | boost::filesystem::path path(file); |
162 | 162 | writer.addFile(file, path.c_str()); |
163 | + boost::filesystem::remove(path); | |
163 | 164 | } |
164 | 165 | // close the archive |
165 | 166 | writer.close(); | ... | ... |
src/PostProcessing/GzipPostProcessing.cc
... | ... | @@ -16,6 +16,7 @@ |
16 | 16 | #include <boost/iostreams/filter/gzip.hpp> |
17 | 17 | #include <boost/iostreams/device/file.hpp> |
18 | 18 | #include <boost/filesystem/path.hpp> |
19 | +#include <boost/filesystem.hpp> | |
19 | 20 | |
20 | 21 | namespace postprocessing { |
21 | 22 | |
... | ... | @@ -63,6 +64,8 @@ std::string GzipPostProcessing::gzip(std::string& pFile, |
63 | 64 | out.push(file); |
64 | 65 | boost::iostreams::copy(in, out); |
65 | 66 | file.close(); |
67 | + boost::filesystem::path path(pFile); | |
68 | + boost::filesystem::remove(path); | |
66 | 69 | |
67 | 70 | return outFile; |
68 | 71 | } | ... | ... |