Add wrappers around boost::filesystem methods that handle the
authorCarl Hetherington <cth@carlh.net>
Fri, 6 Oct 2023 00:04:49 +0000 (02:04 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 8 Oct 2023 23:20:01 +0000 (01:20 +0200)
commite4b2ebd80779a44d24fe87af26ef278c1e2d97d2
tree3bc940c5eb49c96c3c18a896c8ccd8039e6db839
parent3be26a66645de04c7b220abeebfd2f024990a696
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.
38 files changed:
src/array_data.cc
src/asset.cc
src/asset_factory.cc
src/asset_map.cc
src/asset_reader.h
src/atmos_asset.cc
src/atmos_asset_writer.cc
src/certificate_chain.cc
src/combine.cc
src/cpl.cc
src/dcp.cc
src/file.cc
src/file.h
src/filesystem.cc [new file with mode: 0644]
src/filesystem.h [new file with mode: 0644]
src/interop_subtitle_asset.cc
src/mono_picture_asset.cc
src/mono_picture_frame.cc
src/picture_asset_writer_common.cc
src/pkl.cc
src/search.cc
src/smpte_subtitle_asset.cc
src/sound_asset.cc
src/sound_asset_writer.cc
src/stereo_picture_asset.cc
src/subtitle_image.cc
src/util.cc
src/verify.cc
src/wscript
test/encryption_test.cc
test/file_test.cc [deleted file]
test/filesystem_test.cc [new file with mode: 0644]
test/long_filenames_test.cc [new file with mode: 0644]
test/wscript
tools/dcpdiff.cc
tools/dcpinfo.cc
tools/dcprecover.cc
tools/dcpverify.cc