diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-23 20:16:07 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-23 20:16:07 +0100 |
| commit | 4947d7260fa164d5f47cfb688d029a0fd6ab9967 (patch) | |
| tree | a282f624c5a685a0c90cf4f1b5a924337755987a /src/lib/util.cc | |
| parent | ab108b87e1059720264432165a921ab3b259e0a6 (diff) | |
FIXME: use new libdcp open_error API.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 086a99f24..ddcc8e3de 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -498,7 +498,7 @@ digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t size) while (i < int64_t (files.size()) && to_do > 0) { dcp::File f(files[i], "rb"); if (!f) { - throw OpenFileError (files[i].string(), errno, OpenFileError::READ); + throw OpenFileError(files[i].string(), f.open_error(), OpenFileError::READ); } boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i])); @@ -517,7 +517,7 @@ digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t size) while (i >= 0 && to_do > 0) { dcp::File f(files[i], "rb"); if (!f) { - throw OpenFileError (files[i].string(), errno, OpenFileError::READ); + throw OpenFileError(files[i].string(), f.open_error(), OpenFileError::READ); } boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i])); @@ -892,11 +892,11 @@ copy_in_bits (boost::filesystem::path from, boost::filesystem::path to, std::fun { dcp::File f(from, "rb"); if (!f) { - throw OpenFileError (from, errno, OpenFileError::READ); + throw OpenFileError(from, f.open_error(), OpenFileError::READ); } dcp::File t(to, "wb"); if (!t) { - throw OpenFileError (to, errno, OpenFileError::WRITE); + throw OpenFileError(to, t.open_error(), OpenFileError::WRITE); } /* on the order of a second's worth of copying */ |
