mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-24 12:49:03 -05:00
fix: refuse an archive holding no declared member
_holding_members kept every same-named copy when the best held nothing, so galgames.zip, a lone assembler listing, resolved by name for mame, groovymame and mame4droid-2024, and awbios.zip for mame4droid. Such a copy now resolves as hash_mismatch. mame2003_plus declared its contents by name only, while fileio.c:1031-1040 loads a member by CRC when the name is absent. The 61 members now carry the CRC their driver declares, so stvbios, megatech and the six ZN sets keep matching the archives the collection holds.
This commit is contained in:
1 parent
604ab3371b
commit
5004c4d8d5
3 files changed
+77
-1
No files matched your search
@@ -1094,6 +1094,10 @@ def _holding_members(paths: list[str], members: list[dict]) -> list[str]:
|
||||
|
||||
scores = {path: held(path) for path in paths}
|
||||
best = max(scores.values(), default=(0, 0))
|
||||
if best == (0, 0):
|
||||
# Not one declared member in any copy: the name is all that matches,
|
||||
# and galgames.zip holding only an assembler listing is not the set.
|
||||
return []
|
||||
return [path for path in paths if scores[path] == best]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user