mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
fix: resolve_file skips MD5 lookup for zipped_file entries
Same guard as verify.py: when zipped_file is set, the md5 is for the inner ROM, not the container ZIP. Direct MD5 lookup resolved to the standalone ROM file instead of the ZIP parent. Fixes: ep64.zip/ep128.zip (Enterprise) written as raw ROM data instead of ZIP archives in Batocera pack. Also fixes any other zipped_file entry where the inner ROM MD5 matched a standalone file in the database. Also: update Dinothawr.zip SHA1 in retroarch.yml to match actual file.
This commit is contained in:
@@ -121,7 +121,9 @@ def resolve_file(file_entry: dict, db: dict, bios_dir: str,
|
||||
if os.path.exists(local_path):
|
||||
return local_path, "exact"
|
||||
|
||||
if md5:
|
||||
# Skip MD5 direct lookup for zipped_file entries: the md5 is for the inner ROM,
|
||||
# not the container ZIP. Matching it would resolve to the standalone ROM file.
|
||||
if md5 and not zipped_file:
|
||||
sha1_from_md5 = db.get("indexes", {}).get("by_md5", {}).get(md5)
|
||||
if sha1_from_md5 and sha1_from_md5 in db["files"]:
|
||||
local_path = db["files"][sha1_from_md5]["path"]
|
||||
|
||||
Reference in New Issue
Block a user