From 96f50dd5e600925488fdd9db1580aa01b026269b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 6 Oct 2023 02:37:16 +0200 Subject: Use dcp::filesystem to wrap filesystem calls and fix_long_path anything that is passed to read_file() from libcxml. This should fix #2623 and other similar problems. --- src/lib/kdm_cli.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/lib/kdm_cli.cc') diff --git a/src/lib/kdm_cli.cc b/src/lib/kdm_cli.cc index 3402fa71c..5ea808967 100644 --- a/src/lib/kdm_cli.cc +++ b/src/lib/kdm_cli.cc @@ -35,6 +35,7 @@ #include #include #include +#include #include @@ -435,7 +436,7 @@ optional kdm_cli (int argc, char* argv[], std::function out) try { - boost::filesystem::path output = boost::filesystem::current_path(); + boost::filesystem::path output = dcp::filesystem::current_path(); auto container_name_format = Config::instance()->kdm_container_name_format(); auto filename_format = Config::instance()->kdm_filename_format(); optional cinema_name; @@ -643,7 +644,7 @@ try } string const thing = argv[optind]; - if (boost::filesystem::is_directory(thing) && boost::filesystem::is_regular_file(boost::filesystem::path(thing) / "metadata.xml")) { + if (dcp::filesystem::is_directory(thing) && dcp::filesystem::is_regular_file(boost::filesystem::path(thing) / "metadata.xml")) { from_film ( screens, thing, @@ -661,7 +662,7 @@ try out ); } else { - if (boost::filesystem::is_regular_file(thing)) { + if (dcp::filesystem::is_regular_file(thing)) { dkdm = dcp::EncryptedKDM (dcp::file_to_string (thing)); } else { dkdm = find_dkdm (thing); -- cgit v1.2.3