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/array_data.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/array_data.cc') diff --git a/src/array_data.cc b/src/array_data.cc index 52a22cf6..e388454a 100644 --- a/src/array_data.cc +++ b/src/array_data.cc @@ -39,6 +39,7 @@ #include "array_data.h" #include "file.h" +#include "filesystem.h" #include "exceptions.h" #include "util.h" #include @@ -71,7 +72,7 @@ ArrayData::ArrayData (uint8_t const * data, int size) ArrayData::ArrayData (boost::filesystem::path file) { - auto const size = boost::filesystem::file_size (file); + auto const size = filesystem::file_size(file); _data = std::make_shared>(size); File f(file, "rb"); -- cgit v1.2.3