diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-06 02:37:16 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-10-09 23:38:28 +0200 |
| commit | 96f50dd5e600925488fdd9db1580aa01b026269b (patch) | |
| tree | ea8b837a596eb99a7416bfdbfd2d7e4f38603a7b /src/lib/kdm_cli.cc | |
| parent | 94a9473993b027b9368077009decbdd4322f90e3 (diff) | |
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.
Diffstat (limited to 'src/lib/kdm_cli.cc')
| -rw-r--r-- | src/lib/kdm_cli.cc | 7 |
1 files changed, 4 insertions, 3 deletions
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 <dcp/certificate.h> #include <dcp/decrypted_kdm.h> #include <dcp/encrypted_kdm.h> +#include <dcp/filesystem.h> #include <getopt.h> @@ -435,7 +436,7 @@ optional<string> kdm_cli (int argc, char* argv[], std::function<void (string)> 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<string> 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); |
