From dee25c497c017c2b88d618ec1ce034f86af5c452 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 12 Aug 2026 02:21:21 +0000 Subject: Normalize legacy archive comparison inputs --- src/manifest.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/manifest.rs b/src/manifest.rs index 57e57c5..c25f0a8 100644 --- a/src/manifest.rs +++ b/src/manifest.rs @@ -96,6 +96,9 @@ impl ArtifactManifest { let mut 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 entry_type = entry.header().entry_type(); let kind = match entry_type { EntryType::Regular => "file", @@ -235,6 +238,14 @@ fn is_enabled_service(path: &str) -> bool { && path.ends_with(".service") } +fn is_internal_metadata_path(path: &str) -> bool { + matches!(path.split('/').next(), Some(".host" | ".fakedata")) +} + +fn is_archive_root_path(path: &str) -> bool { + path == "." || path == "./" +} + fn service_name(path: &str) -> Result<&str> { path.rsplit('/') .next() -- cgit v1.2.3