mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
refactor: fix code review findings across all scripts
Critical: stream large file downloads (OOM fix), fix basename match in auto_fetch, include hashes in pack grouping fingerprint, handle not_in_zip status in verify, fix escaped quotes in batocera parser. Important: deduplicate shared group includes, catch coreinfo network errors, fix NODEDUP path component match, fix CI word splitting on spaces, replace bare except Exception in 3 files. Minor: argparse in list_platforms, specific exceptions in download.py.
This commit is contained in:
@@ -155,13 +155,21 @@ def verify_entry_md5(file_entry: dict, local_path: str | None) -> dict:
|
||||
return {"name": name, "status": Status.MISSING, "expected_md5": expected_md5}
|
||||
|
||||
if zipped_file:
|
||||
found_in_zip = False
|
||||
for md5_candidate in md5_list or [""]:
|
||||
result = check_inside_zip(local_path, zipped_file, md5_candidate)
|
||||
if result == Status.OK:
|
||||
return {"name": name, "status": Status.OK, "path": local_path}
|
||||
if result != "not_in_zip":
|
||||
found_in_zip = True
|
||||
reason = (
|
||||
f"{zipped_file} not found inside ZIP"
|
||||
if not found_in_zip
|
||||
else f"{zipped_file} MD5 mismatch inside ZIP"
|
||||
)
|
||||
return {
|
||||
"name": name, "status": Status.UNTESTED, "path": local_path,
|
||||
"reason": f"{zipped_file} MD5 mismatch inside ZIP",
|
||||
"reason": reason,
|
||||
}
|
||||
|
||||
if not md5_list:
|
||||
|
||||
Reference in New Issue
Block a user