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. --- tools/dcpdiff.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/dcpdiff.cc') diff --git a/tools/dcpdiff.cc b/tools/dcpdiff.cc index 3dace12a..7c7c4b71 100644 --- a/tools/dcpdiff.cc +++ b/tools/dcpdiff.cc @@ -32,10 +32,11 @@ */ +#include "common.h" #include "dcp.h" #include "equality_options.h" #include "exceptions.h" -#include "common.h" +#include "filesystem.h" #include "mxf.h" #include #include @@ -207,12 +208,12 @@ main (int argc, char* argv[]) exit (EXIT_FAILURE); } - if (!boost::filesystem::exists (argv[optind])) { + if (!filesystem::exists(argv[optind])) { cerr << argv[0] << ": DCP " << argv[optind] << " not found.\n"; exit (EXIT_FAILURE); } - if (!boost::filesystem::exists (argv[optind + 1])) { + if (!filesystem::exists(argv[optind + 1])) { cerr << argv[0] << ": DCP " << argv[optind + 1] << " not found.\n"; exit (EXIT_FAILURE); } -- cgit v1.2.3