diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-06 02:04:49 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-10-09 01:20:01 +0200 |
| commit | e4b2ebd80779a44d24fe87af26ef278c1e2d97d2 (patch) | |
| tree | 3bc940c5eb49c96c3c18a896c8ccd8039e6db839 /src/atmos_asset_writer.cc | |
| parent | 3be26a66645de04c7b220abeebfd2f024990a696 (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 'src/atmos_asset_writer.cc')
| -rw-r--r-- | src/atmos_asset_writer.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/atmos_asset_writer.cc b/src/atmos_asset_writer.cc index 9d7363d0..0c895b5b 100644 --- a/src/atmos_asset_writer.cc +++ b/src/atmos_asset_writer.cc @@ -43,6 +43,7 @@ #include "crypto_context.h" #include "dcp_assert.h" #include "exceptions.h" +#include "filesystem.h" #include <asdcp/AS_DCP.h> @@ -94,7 +95,7 @@ AtmosAssetWriter::write (uint8_t const * data, int size) DCP_ASSERT (!_finalized); if (!_started) { - auto r = _state->mxf_writer.OpenWrite (_file.string().c_str(), _state->writer_info, _state->desc); + auto r = _state->mxf_writer.OpenWrite(dcp::filesystem::fix_long_path(_file).string().c_str(), _state->writer_info, _state->desc); if (ASDCP_FAILURE(r)) { boost::throw_exception (FileError ("could not open atmos MXF for writing", _file.string(), r)); } |
