diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp.cc | 6 | ||||
| -rw-r--r-- | src/dcp.h | 2 | ||||
| -rw-r--r-- | src/name_format.cc | 4 | ||||
| -rw-r--r-- | src/name_format.h | 2 |
4 files changed, 6 insertions, 8 deletions
@@ -466,15 +466,13 @@ DCP::write_xml ( BOOST_FOREACH (shared_ptr<CPL> i, cpls ()) { NameFormat::Map values; values['t'] = "cpl"; - values['i'] = i->id(); - i->write_xml (_directory / (name_format.get(values) + ".xml"), standard, signer); + i->write_xml (_directory / (name_format.get(values, "_" + i->id() + ".xml")), standard, signer); } string const pkl_uuid = make_uuid (); NameFormat::Map values; values['t'] = "pkl"; - values['i'] = pkl_uuid; - boost::filesystem::path const pkl_path = write_pkl (name_format.get(values) + ".xml", standard, pkl_uuid, metadata, signer); + boost::filesystem::path const pkl_path = write_pkl (name_format.get(values, "_" + pkl_uuid + ".xml"), standard, pkl_uuid, metadata, signer); write_volindex (standard); write_assetmap (standard, pkl_uuid, pkl_path, metadata); @@ -113,7 +113,7 @@ public: Standard standard, XMLMetadata metadata = XMLMetadata (), boost::shared_ptr<const CertificateChain> signer = boost::shared_ptr<const CertificateChain> (), - NameFormat name_format = NameFormat("%t_%i") + NameFormat name_format = NameFormat("%t") ); void resolve_refs (std::list<boost::shared_ptr<Asset> > assets); diff --git a/src/name_format.cc b/src/name_format.cc index a85f232d..7b9cfd63 100644 --- a/src/name_format.cc +++ b/src/name_format.cc @@ -65,7 +65,7 @@ filter (string c) } string -NameFormat::get (Map values) const +NameFormat::get (Map values, string suffix) const { string result; for (size_t i = 0; i < _specification.length(); ++i) { @@ -84,7 +84,7 @@ NameFormat::get (Map values) const } } - return result; + return result + suffix; } bool diff --git a/src/name_format.h b/src/name_format.h index 7390dd5c..eb6f4308 100644 --- a/src/name_format.h +++ b/src/name_format.h @@ -59,7 +59,7 @@ public: typedef std::map<char, std::string> Map; - std::string get (Map) const; + std::string get (Map, std::string suffix) const; private: std::string _specification; |
