summaryrefslogtreecommitdiff
path: root/src/manifest.rs
diff options
context:
space:
mode:
authorHermes Agent <hermes@localhost>2026-08-12 02:42:03 +0000
committerHermes Agent <hermes@localhost>2026-08-12 02:42:03 +0000
commit2a3fb3adabb0aa17113032ad785458556fb6372e (patch)
treed2b3d81f337ccd95984eec659aca00e8789f89de /src/manifest.rs
parentcad87b77c0003c851abb6264d3e373e9516edaae (diff)
Filter internal members from collected archive facts
Diffstat (limited to 'src/manifest.rs')
-rw-r--r--src/manifest.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/manifest.rs b/src/manifest.rs
index c25f0a8..afbf5d6 100644
--- a/src/manifest.rs
+++ b/src/manifest.rs
@@ -185,6 +185,10 @@ fn collect_archive_members(archive_path: &Path) -> Result<Vec<ArchiveMemberRecor
let mut members = Vec::new();
for entry in archive.entries().with_context(|| format!("read archive {}", archive_path.display()))? {
let entry = entry.with_context(|| format!("read archive member from {}", archive_path.display()))?;
+ let path = portable_path(&entry.path()?)?;
+ if is_archive_root_path(&path) || is_internal_metadata_path(&path) {
+ continue;
+ }
let kind = match entry.header().entry_type() {
EntryType::Regular => "file",
EntryType::Directory => "directory",
@@ -192,7 +196,7 @@ fn collect_archive_members(archive_path: &Path) -> Result<Vec<ArchiveMemberRecor
EntryType::Link => "hardlink",
other => bail!("unsupported archive member type {other:?} in {}", archive_path.display()),
};
- members.push(ArchiveMemberRecord::new(portable_path(&entry.path()?)?, kind));
+ members.push(ArchiveMemberRecord::new(path, kind));
}
Ok(members)
}