[pbs-devel] [PATCH v9 proxmox-backup 16/58] file restore: show more error context when extraction fails
Christian Ebner
c.ebner at proxmox.com
Wed Jun 5 12:53:34 CEST 2024
Otherwise the context swallows the actual, underlying error message.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 8:
- no changes
proxmox-file-restore/src/main.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/proxmox-file-restore/src/main.rs b/proxmox-file-restore/src/main.rs
index e6a21afa2..38cc1ce85 100644
--- a/proxmox-file-restore/src/main.rs
+++ b/proxmox-file-restore/src/main.rs
@@ -490,7 +490,9 @@ async fn extract(
};
let decoder = Accessor::new(reader, archive_size).await?;
- extract_to_target(decoder, &path, target, format, zstd).await?;
+ extract_to_target(decoder, &path, target, format, zstd)
+ .await
+ .map_err(|err| format_err!("error extracting archive - {err:#}"))?;
}
ExtractPath::VM(file, path) => {
let details = SnapRestoreDetails {
--
2.39.2
More information about the pbs-devel
mailing list