summaryrefslogtreecommitdiff
path: root/tools/dcprecover.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-10-06 02:04:49 +0200
committerCarl Hetherington <cth@carlh.net>2023-10-09 01:20:01 +0200
commite4b2ebd80779a44d24fe87af26ef278c1e2d97d2 (patch)
tree3bc940c5eb49c96c3c18a896c8ccd8039e6db839 /tools/dcprecover.cc
parent3be26a66645de04c7b220abeebfd2f024990a696 (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 'tools/dcprecover.cc')
-rw-r--r--tools/dcprecover.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/dcprecover.cc b/tools/dcprecover.cc
index 840a6711..b78846ff 100644
--- a/tools/dcprecover.cc
+++ b/tools/dcprecover.cc
@@ -36,6 +36,7 @@
#include "cpl.h"
#include "dcp.h"
#include "exceptions.h"
+#include "filesystem.h"
#include "reel_asset.h"
#include "warnings.h"
#include <getopt.h>
@@ -124,7 +125,7 @@ main (int argc, char* argv[])
/* Look for a CPL */
shared_ptr<dcp::CPL> cpl;
- for (auto i: boost::filesystem::directory_iterator(dcp_dir)) {
+ for (auto i: dcp::filesystem::directory_iterator(dcp_dir)) {
if (i.path().extension() == ".xml") {
try {
cpl = make_shared<dcp::CPL>(i.path());
@@ -146,7 +147,7 @@ main (int argc, char* argv[])
/* Read all MXF assets */
vector<shared_ptr<dcp::Asset>> assets;
- for (auto i: boost::filesystem::directory_iterator(dcp_dir)) {
+ for (auto i: dcp::filesystem::directory_iterator(dcp_dir)) {
if (i.path().extension() == ".mxf") {
try {
auto asset = dcp::asset_factory(i.path(), true);