diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-03-17 21:45:46 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-03-18 00:12:45 +0100 |
| commit | a6f2b7b15a4d80c9bcd763765fc7ccd7407f6820 (patch) | |
| tree | e97d3258852f03d2745e7120fa9e3c682a810362 /src/lib/kdm_with_metadata.cc | |
| parent | c36cc02c31740f6676e31df2c36001e5d082c71c (diff) | |
Fix writing KDMs with long filenames.
Diffstat (limited to 'src/lib/kdm_with_metadata.cc')
| -rw-r--r-- | src/lib/kdm_with_metadata.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/kdm_with_metadata.cc b/src/lib/kdm_with_metadata.cc index a486952f8..e3c0d9204 100644 --- a/src/lib/kdm_with_metadata.cc +++ b/src/lib/kdm_with_metadata.cc @@ -19,24 +19,25 @@ */ -#include "kdm_with_metadata.h" #include "cinema.h" -#include "screen.h" -#include "util.h" -#include "zipper.h" #include "config.h" +#include "cross.h" #include "dcpomatic_log.h" #include "emailer.h" +#include "kdm_with_metadata.h" +#include "screen.h" +#include "util.h" +#include "zipper.h" #include "i18n.h" -using std::string; using std::cout; +using std::function; using std::list; using std::shared_ptr; +using std::string; using boost::optional; -using std::function; int @@ -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); |
