summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-06-01 01:11:53 +0100
committerCarl Hetherington <cth@carlh.net>2017-06-01 01:11:53 +0100
commit9df90fa5776dc4e96157de844c632f8b84c78cb3 (patch)
treea65cd2354d0988b7707f5720651fd77cc4602c10 /src
parent2706520af92db48acb2619b622ab0edda71feb4c (diff)
Remove emailed ZIP files when they are no longer needed.
Diffstat (limited to 'src')
-rw-r--r--src/lib/cinema_kdms.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/cinema_kdms.cc b/src/lib/cinema_kdms.cc
index dc9bfd3d7..1ec854620 100644
--- a/src/lib/cinema_kdms.cc
+++ b/src/lib/cinema_kdms.cc
@@ -246,6 +246,7 @@ CinemaKDMs::email (
try {
email.send (c->mail_server(), c->mail_port(), c->mail_user(), c->mail_password());
} catch (...) {
+ boost::filesystem::remove (zip_file);
if (log) {
log->log ("Email content follows", LogEntry::TYPE_DEBUG_EMAIL);
log->log (email.email(), LogEntry::TYPE_DEBUG_EMAIL);
@@ -255,6 +256,8 @@ CinemaKDMs::email (
throw;
}
+ boost::filesystem::remove (zip_file);
+
if (log) {
log->log ("Email content follows", LogEntry::TYPE_DEBUG_EMAIL);
log->log (email.email(), LogEntry::TYPE_DEBUG_EMAIL);