X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcinema_kdms.cc;h=aaeb0d9056f3f89b94b9c62c731b4a8edd7912ef;hb=0c9f5940dc1a4aa5cf5ed5d0cd2759a86bca9c3c;hp=1ec8546201895d0c5f247492a887960446c87e10;hpb=9df90fa5776dc4e96157de844c632f8b84c78cb3;p=dcpomatic.git diff --git a/src/lib/cinema_kdms.cc b/src/lib/cinema_kdms.cc index 1ec854620..aaeb0d905 100644 --- a/src/lib/cinema_kdms.cc +++ b/src/lib/cinema_kdms.cc @@ -65,6 +65,7 @@ CinemaKDMs::make_zip_file (boost::filesystem::path zip_file, dcp::NameFormat nam } name_values['s'] = i.screen->name; + name_values['i'] = i.kdm.id (); string const name = name_format.get(name_values, ".xml"); if (zip_add (zip, name.c_str(), source) == -1) { throw runtime_error ("failed to add KDM to ZIP archive"); @@ -208,7 +209,8 @@ CinemaKDMs::email ( 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);