diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-03-17 21:45:46 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-04-02 22:24:26 +0200 |
| commit | 545f81b624f54d932c27f75ff0912d78098b4c8d (patch) | |
| tree | 1e7634af72ba1da0a239fd561dc461a8ab521c0b /src/lib | |
| parent | 50abff915cf35507edc9c53c3efc8d3670bf918d (diff) | |
Fix writing KDMs with long filenames.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/kdm_with_metadata.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/kdm_with_metadata.cc b/src/lib/kdm_with_metadata.cc index 9292be224..e3c0d9204 100644 --- a/src/lib/kdm_with_metadata.cc +++ b/src/lib/kdm_with_metadata.cc @@ -21,6 +21,7 @@ #include "cinema.h" #include "config.h" +#include "cross.h" #include "dcpomatic_log.h" #include "emailer.h" #include "kdm_with_metadata.h" @@ -65,7 +66,7 @@ write_files ( /* Write KDMs to the specified directory */ for (auto i: kdms) { - auto out = directory / careful_string_filter(name_format.get(i->name_values(), ".xml")); + auto out = fix_long_path(directory / careful_string_filter(name_format.get(i->name_values(), ".xml"))); if (!boost::filesystem::exists (out) || confirm_overwrite (out)) { i->kdm_as_xml (out); ++written; @@ -145,7 +146,7 @@ write_directories ( int written = 0; for (auto const& i: kdms) { - boost::filesystem::path path = directory; + auto path = directory; path /= container_name_format.get(i.front()->name_values(), "", "s"); if (!boost::filesystem::exists (path) || confirm_overwrite (path)) { boost::filesystem::create_directories (path); |
