fix: read .variants archives as archives

A .variants copy is named set.zip.<md5 prefix>, and five checks of a
collection path tested endswith(".zip"): the zipped_file contents index
skipped all 278 copies (658 member md5s held nowhere else), the pack added
them without the member CRC test, and the archive acceptance count gave
them -1. They now use is_archive_path. In the index a member a primary
archive holds answers with the primary, as the resolver prefers it.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 10:31:11 +01:00
1 parent b8fe881327
commit 32a4ca1fa1
2 files changed
+34 -1

No files matched your search

+4 -1
View File
@@ -203,7 +203,10 @@ def build_zip_contents_index(
) -> dict:
"""Build {inner_rom_md5: zip_file_sha1} for ROMs inside ZIP files.
Cached in-process, and on disk per archive sha1 when cache_path is set.
A ``.variants/`` copy counts (``neogeo.zip.1a2b3c4d`` is an archive), and
a member a primary archive holds answers with the primary, as the
resolver prefers it. Cached in-process, and on disk per archive sha1
when cache_path is set.
"""
global _zip_contents_cache