diff options
| author | Hermes Agent <hermes@localhost> | 2026-08-12 06:39:37 +0000 |
|---|---|---|
| committer | Hermes Agent <hermes@localhost> | 2026-08-12 06:39:37 +0000 |
| commit | 227ee2af958eba340d5d7b269387455b4513277d (patch) | |
| tree | 615c3605f45edb4c39abae9937ea236acc634390 /src | |
| parent | 200df1f46cc5a5a5659c90ab37c2ba624cb17b5a (diff) | |
Reject ambiguous archive members in comparison
Diffstat (limited to 'src')
| -rw-r--r-- | src/manifest.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/manifest.rs b/src/manifest.rs index 4cd256c..067dc9a 100644 --- a/src/manifest.rs +++ b/src/manifest.rs @@ -110,6 +110,7 @@ impl ArtifactManifest { let mut services = Vec::new(); let mut archive_members = Vec::new(); let mut initrd = None; + let mut member_paths = HashSet::new(); for entry in archive .entries() @@ -121,6 +122,12 @@ impl ArtifactManifest { if is_archive_root_path(&path) || is_internal_metadata_path(&path) { continue; } + if !member_paths.insert(path.clone()) { + bail!( + "duplicate archive member record: {path} in {}", + archive_path.display() + ); + } let entry_type = entry.header().entry_type(); let kind = match entry_type { EntryType::Regular => "file", |