diff --git a/pxar-bin/Cargo.toml b/pxar-bin/Cargo.toml index d91c03d3e..bb010ff78 100644 --- a/pxar-bin/Cargo.toml +++ b/pxar-bin/Cargo.toml @@ -20,6 +20,7 @@ pathpatterns.workspace = true pxar.workspace = true proxmox-async.workspace = true +proxmox-human-byte.workspace = true proxmox-router = { workspace = true, features = ["cli", "server"] } proxmox-schema = { workspace = true, features = [ "api-macro" ] } proxmox-sys.workspace = true diff --git a/pxar-bin/src/main.rs b/pxar-bin/src/main.rs index 52bb1ca97..7ea5b114a 100644 --- a/pxar-bin/src/main.rs +++ b/pxar-bin/src/main.rs @@ -18,6 +18,7 @@ use pbs_client::pxar::{ }; use pxar::EntryKind; +use proxmox_human_byte::HumanByte; use proxmox_router::cli::*; use proxmox_schema::api; @@ -490,6 +491,14 @@ fn dump_archive(archive: String, payload_input: Option) -> Result<(), Er if log::log_enabled!(log::Level::Debug) { match entry.kind() { + EntryKind::Version(version) => { + log::debug!("pxar format version '{version:?}'"); + continue; + } + EntryKind::Prelude(prelude) => { + log::debug!("prelude of size {}", HumanByte::from(prelude.data.len())); + continue; + } EntryKind::File { payload_offset: Some(offset), size, @@ -508,7 +517,10 @@ fn dump_archive(archive: String, payload_input: Option) -> Result<(), Er log::debug!("{}", format_single_line_entry(&entry)); } else { - log::info!("{:?}", entry.path()); + match entry.kind() { + EntryKind::Version(_) | EntryKind::Prelude(_) => continue, + _ => log::info!("{:?}", entry.path()), + } } } Ok(())