Be careful that we're checking the _current_file rather than the optional.
authorCarl Hetherington <cth@carlh.net>
Fri, 23 Dec 2022 19:15:55 +0000 (20:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 23 Dec 2022 19:15:55 +0000 (20:15 +0100)
src/lib/file_group.cc

index f4d50028ecdc1037ae1547818e30248992fd64d4..5a73d66b8b4236427914a8dfe4c104fa2bd05808 100644 (file)
@@ -85,8 +85,8 @@ FileGroup::ensure_open_path (size_t p) const
 
        _current_path = p;
        _current_file = dcp::File(_paths[_current_path], "rb");
-       if (!_current_file) {
                throw OpenFileError (_paths[_current_path], errno, OpenFileError::READ);
+       if (!_current_file->get()) {
        }
        _current_size = boost::filesystem::file_size (_paths[_current_path]);
 }