Make careful_string_filter a little better and use it for KDM filenames.
[dcpomatic.git] / src / lib / cinema_kdms.cc
index 2e1d03b404bc5accc45d35f8ee71e0d487ab4738..558aee504bca2998aee932681b2b04b4cf7047e2 100644 (file)
@@ -67,7 +67,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");
+               string const name = careful_string_filter(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");
                }