diff --git a/src/api2/tape/restore.rs b/src/api2/tape/restore.rs index f3452364..9884b379 100644 --- a/src/api2/tape/restore.rs +++ b/src/api2/tape/restore.rs @@ -800,7 +800,7 @@ fn try_restore_snapshot_archive( worker: Arc, decoder: &mut pxar::decoder::sync::Decoder, snapshot_path: &Path, -) -> Result<(), Error> { +) -> Result { let _root = match decoder.next() { None => bail!("missing root entry"), @@ -886,9 +886,10 @@ fn try_restore_snapshot_archive( } } - if manifest.is_none() { - bail!("missing manifest"); - } + let manifest = match manifest { + None => bail!("missing manifest"), + Some(manifest) => manifest, + }; // Do not verify anything here, because this would be to slow (causes tape stops). @@ -902,7 +903,7 @@ fn try_restore_snapshot_archive( bail!("Atomic rename manifest {:?} failed - {}", manifest_path, err); } - Ok(()) + Ok(manifest) } /// Try to restore media catalogs (form catalog_archives)