From e4b2ebd80779a44d24fe87af26ef278c1e2d97d2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 6 Oct 2023 02:04:49 +0200 Subject: 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. --- src/asset_factory.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/asset_factory.cc') diff --git a/src/asset_factory.cc b/src/asset_factory.cc index 2ab79899..1f830cce 100644 --- a/src/asset_factory.cc +++ b/src/asset_factory.cc @@ -61,7 +61,7 @@ dcp::asset_factory (boost::filesystem::path path, bool ignore_incorrect_picture_ */ ASDCP::EssenceType_t type; - auto const result = ASDCP::EssenceType(path.string().c_str(), type); + auto const result = ASDCP::EssenceType(dcp::filesystem::fix_long_path(path).string().c_str(), type); if (result != ASDCP::RESULT_OK) { throw ReadError(String::compose("Could not find essence type (%1)", result.Message()), path.string()); } -- cgit v1.2.3