diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-06 02:37:16 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-10-09 01:21:22 +0200 |
| commit | f0f4dd5e6b6ed5e50d0444a4de3b2a13156edf64 (patch) | |
| tree | dce96c211c6d92062187e8c40026c04a26af72e9 /src/lib/file_group.cc | |
| parent | 89e39ea9e20bc4f8e88e42a57d4505e1fa69fde5 (diff) | |
Use dcp::filesystem to wrap filesystem calls and fix_long_path2623-add-windows
anything that is passed to read_file() from libcxml.
This should fix #2623 and other similar problems.
Diffstat (limited to 'src/lib/file_group.cc')
| -rw-r--r-- | src/lib/file_group.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc index f4d50028e..228faa74d 100644 --- a/src/lib/file_group.cc +++ b/src/lib/file_group.cc @@ -29,6 +29,7 @@ #include "dcpomatic_assert.h" #include "exceptions.h" #include "file_group.h" +#include <dcp/filesystem.h> #include <sndfile.h> #include <cstdio> @@ -88,7 +89,7 @@ FileGroup::ensure_open_path (size_t p) const if (!_current_file) { throw OpenFileError (_paths[_current_path], errno, OpenFileError::READ); } - _current_size = boost::filesystem::file_size (_paths[_current_path]); + _current_size = dcp::filesystem::file_size(_paths[_current_path]); } @@ -111,7 +112,7 @@ FileGroup::seek (int64_t pos, int whence) const size_t i = 0; int64_t sub_pos = _position; while (i < _paths.size()) { - boost::uintmax_t len = boost::filesystem::file_size (_paths[i]); + boost::uintmax_t len = dcp::filesystem::file_size(_paths[i]); if (sub_pos < int64_t(len)) { break; } @@ -188,7 +189,7 @@ FileGroup::length () const { int64_t len = 0; for (size_t i = 0; i < _paths.size(); ++i) { - len += boost::filesystem::file_size (_paths[i]); + len += dcp::filesystem::file_size(_paths[i]); } return len; |
