name_values['c'] = i.cinema->name;
- boost::filesystem::path zip_file = boost::filesystem::temp_directory_path();
+ boost::filesystem::path zip_file = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
+ boost::filesystem::create_directories (zip_file);
zip_file /= container_name_format.get(name_values, ".zip");
i.make_zip_file (zip_file, filename_format, name_values);
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);
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);