diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-06 02:04:49 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-10-09 01:20:01 +0200 |
| commit | e4b2ebd80779a44d24fe87af26ef278c1e2d97d2 (patch) | |
| tree | 3bc940c5eb49c96c3c18a896c8ccd8039e6db839 /test/encryption_test.cc | |
| parent | 3be26a66645de04c7b220abeebfd2f024990a696 (diff) | |
Add wrappers around boost::filesystem methods that handle the
required mangling of long filenames on Windows.
Also wrap lots of missing places (e.g. calls to asdcplib, libxml++,
libcxml etc.) in dcp::filesystem::fix_long_path().
The idea is to keep paths un-mangled until they we call some
filesystem-related API and mangle them at that point. Otherwise
we end up serialising mangled names, which seems like it will
not end well.
Should fix DoM #2623.
Diffstat (limited to 'test/encryption_test.cc')
| -rw-r--r-- | test/encryption_test.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/encryption_test.cc b/test/encryption_test.cc index f2a40843..358a3fd9 100644 --- a/test/encryption_test.cc +++ b/test/encryption_test.cc @@ -36,6 +36,7 @@ #include "dcp.h" #include "certificate_chain.h" #include "cpl.h" +#include "filesystem.h" #include "mono_picture_asset.h" #include "picture_asset_writer.h" #include "sound_asset_writer.h" @@ -155,6 +156,11 @@ BOOST_AUTO_TEST_CASE (encryption_test) kdm.encrypt (signer, signer->leaf(), vector<string>(), dcp::Formulation::MODIFIED_TRANSITIONAL_1, true, 0).as_xml("build/test/encryption_test.kdm.xml"); + /* Make sure we aren't in a UNC current working directory otherwise the use of cmd.exe + * in system() below will fail. + */ + boost::filesystem::current_path(dcp::filesystem::unfix_long_path(boost::filesystem::current_path())); + int r = system ( "xmllint --path schema --nonet --noout --schema schema/SMPTE-430-1-2006-Amd-1-2009-KDM.xsd build/test/encryption_test.kdm.xml " #ifndef LIBDCP_WINDOWS |
