Fix stupid bug introduced in 5db3eda9c6f0
authorCarl Hetherington <cth@carlh.net>
Wed, 11 Sep 2024 21:08:32 +0000 (23:08 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 11 Sep 2024 21:08:32 +0000 (23:08 +0200)
src/lib/file_group.cc

index 27137196ef24b93580386ae11c908448512363bb..56a5c2c59bd50f5c20f6df03bc24ed32f2acadad 100644 (file)
@@ -84,9 +84,9 @@ FileGroup::ensure_open_path (size_t p) const
                _current_file->close();
        }
 
-       auto file = dcp::File(_paths[_current_path], "rb");
+       auto file = dcp::File(_paths[p], "rb");
        if (!file) {
-               throw OpenFileError(_paths[_current_path], file.open_error(), OpenFileError::READ);
+               throw OpenFileError(_paths[p], file.open_error(), OpenFileError::READ);
        }
 
        _current_path = p;