tape: improve catalog consistency checks

Try to check if we read the correct catalog by verifying uuid, media_set_uuid
and seq_nr.

Note: this changes the catalog format again.
This commit is contained in:
Dietmar Maurer
2021-03-18 08:43:55 +01:00
parent caf76ec592
commit 237314ad0d
4 changed files with 53 additions and 12 deletions

View File

@ -432,7 +432,7 @@ pub fn list_content(
.generate_media_set_name(&set.uuid, template)
.unwrap_or_else(|_| set.uuid.to_string());
let catalog = MediaCatalog::open(status_path, &media_id.label.uuid, false, false)?;
let catalog = MediaCatalog::open(status_path, &media_id, false, false)?;
for (store, content) in catalog.content() {
for snapshot in content.snapshot_index.keys() {