tape: MediaCatalog: write magic number before content

This commit is contained in:
Dietmar Maurer 2020-12-26 11:05:25 +01:00
parent eb8feb1281
commit 76b15a035f

View File

@ -195,13 +195,14 @@ impl MediaCatalog {
me.log_to_stdout = log_to_stdout;
me.pending.extend(&PROXMOX_BACKUP_MEDIA_CATALOG_MAGIC_1_0);
me.register_label(&media_id.label.uuid, 0)?;
if let Some(ref set) = media_id.media_set_label {
me.register_label(&set.uuid, 1)?;
}
me.pending.extend(&PROXMOX_BACKUP_MEDIA_CATALOG_MAGIC_1_0);
me.commit()?;
Ok(me)