summaryrefslogtreecommitdiff
path: root/src/manifest.rs
diff options
context:
space:
mode:
authorHermes Agent <hermes@localhost>2026-08-12 02:21:21 +0000
committerHermes Agent <hermes@localhost>2026-08-12 02:21:21 +0000
commitdee25c497c017c2b88d618ec1ce034f86af5c452 (patch)
tree8e03bc077d526b611ab570ddd13b461ad01d6ed7 /src/manifest.rs
parent0d60d812c4dcf78a18dcc59325dc1ec609cf8eb8 (diff)
Normalize legacy archive comparison inputs
Diffstat (limited to 'src/manifest.rs')
-rw-r--r--src/manifest.rs11
1 files changed, 11 insertions, 0 deletions
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()