From 9df90fa5776dc4e96157de844c632f8b84c78cb3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 1 Jun 2017 01:11:53 +0100 Subject: [PATCH] Remove emailed ZIP files when they are no longer needed. --- src/lib/cinema_kdms.cc | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.30.2