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 | |
| parent | ab108b87e1059720264432165a921ab3b259e0a6 (diff) | |
FIXME: use new libdcp open_error API.
| -rw-r--r-- | cscript | 2 | ||||
| -rw-r--r-- | src/lib/file_group.cc | 2 | ||||
| -rw-r--r-- | src/lib/film.cc | 2 | ||||
| -rw-r--r-- | src/lib/string_text_file.cc | 2 | ||||
| -rw-r--r-- | src/lib/util.cc | 8 | ||||
| -rw-r--r-- | src/lib/writer.cc | 2 | ||||
| -rw-r--r-- | src/wx/config_dialog.cc | 12 |
7 files changed, 15 insertions, 15 deletions
@@ -453,7 +453,7 @@ def dependencies(target, options): # Use distro-provided FFmpeg on Arch deps = [] - deps.append(('libdcp', 'v1.8.48')) + deps.append(('libdcp', 'a19fe8260a4e1f4cb9d523f5b2cb41eae0a61acd')) deps.append(('libsub', 'v1.6.42')) deps.append(('leqm-nrt', '93ae9e6')) deps.append(('rtaudio', 'f619b76')) diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc index 5a73d66b8..a19c997e5 100644 --- a/src/lib/file_group.cc +++ b/src/lib/file_group.cc @@ -85,8 +85,8 @@ FileGroup::ensure_open_path (size_t p) const _current_path = p; _current_file = dcp::File(_paths[_current_path], "rb"); - throw OpenFileError (_paths[_current_path], errno, OpenFileError::READ); if (!_current_file->get()) { + throw OpenFileError(_paths[_current_path], _current_file->open_error(), OpenFileError::READ); } _current_size = boost::filesystem::file_size (_paths[_current_path]); } diff --git a/src/lib/film.cc b/src/lib/film.cc index 399bd3da3..cdbdcac99 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -2083,7 +2083,7 @@ InfoFileHandle::InfoFileHandle (boost::mutex& mutex, boost::filesystem::path pat , _file (path, read ? "rb" : (boost::filesystem::exists(path) ? "r+b" : "wb")) { if (!_file) { - throw OpenFileError (path, errno, read ? OpenFileError::READ : (boost::filesystem::exists(path) ? OpenFileError::READ_WRITE : OpenFileError::WRITE)); + throw OpenFileError(path, _file.open_error(), read ? OpenFileError::READ : (boost::filesystem::exists(path) ? OpenFileError::READ_WRITE : OpenFileError::WRITE)); } } diff --git a/src/lib/string_text_file.cc b/src/lib/string_text_file.cc index 869a2c96a..a93ba6948 100644 --- a/src/lib/string_text_file.cc +++ b/src/lib/string_text_file.cc @@ -56,7 +56,7 @@ StringTextFile::StringTextFile (shared_ptr<const StringTextFileContent> content) if (ext == ".stl") { dcp::File f(content->path(0), "rb"); if (!f) { - throw OpenFileError (f.path(), errno, OpenFileError::READ); + throw OpenFileError(f.path(), f.open_error(), OpenFileError::READ); } try { reader.reset(new sub::STLBinaryReader(f.get())); 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 */ diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 2e732c280..88cfaeae0 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -712,7 +712,7 @@ Writer::write_cover_sheet (boost::filesystem::path output_dcp) auto const cover = film()->file("COVER_SHEET.txt"); dcp::File f(cover, "w"); if (!f) { - throw OpenFileError (cover, errno, OpenFileError::WRITE); + throw OpenFileError(cover, f.open_error(), OpenFileError::WRITE); } auto text = Config::instance()->cover_sheet (); diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 6403d7e12..7dbda194e 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -469,7 +469,7 @@ CertificateChainEditor::export_certificate () } dcp::File f(path, "w"); if (!f) { - throw OpenFileError (path, errno, OpenFileError::WRITE); + throw OpenFileError(path, f.open_error(), OpenFileError::WRITE); } string const s = j->certificate (true); @@ -493,7 +493,7 @@ CertificateChainEditor::export_chain () } dcp::File f(path, "w"); if (!f) { - throw OpenFileError (path, errno, OpenFileError::WRITE); + throw OpenFileError(path, f.open_error(), OpenFileError::WRITE); } auto const s = _get()->chain(); @@ -621,7 +621,7 @@ CertificateChainEditor::export_private_key () } dcp::File f(path, "w"); if (!f) { - throw OpenFileError (path, errno, OpenFileError::WRITE); + throw OpenFileError(path, f.open_error(), OpenFileError::WRITE); } auto const s = _get()->key().get (); @@ -737,7 +737,7 @@ KeysPage::export_decryption_chain_and_key () boost::filesystem::path path (wx_to_std(d->GetPath())); dcp::File f(path, "w"); if (!f) { - throw OpenFileError (path, errno, OpenFileError::WRITE); + throw OpenFileError(path, f.open_error(), OpenFileError::WRITE); } auto const chain = Config::instance()->decryption_chain()->chain(); @@ -771,7 +771,7 @@ KeysPage::import_decryption_chain_and_key () dcp::File f(wx_to_std(d->GetPath()), "r"); if (!f) { - throw OpenFileError (f.path(), errno, OpenFileError::WRITE); + throw OpenFileError(f.path(), f.open_error(), OpenFileError::WRITE); } string current; @@ -835,7 +835,7 @@ KeysPage::export_decryption_certificate () } dcp::File f(path, "w"); if (!f) { - throw OpenFileError (path, errno, OpenFileError::WRITE); + throw OpenFileError(path, f.open_error(), OpenFileError::WRITE); } auto const s = Config::instance()->decryption_chain()->leaf().certificate (true); |
