mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-13 05:23:51 -06:00
fix: write the cut md5 rule once
Six places read an md5 shorter than 32 digits, each with its own bound. digest_verdict accepted any prefix down to one digit, while Batocera compares the whole string (batocera-systems:1088). A cut value now names a dump only when one held md5 starts with it (cut_md5_owner, read by the scraper, the resolver and --from-md5), and every verdict compares whole digests.
This commit is contained in:
1 parent
8af7b0da13
commit
ed6643022d
10 files changed
+71
-78
No files matched your search
@@ -317,10 +317,7 @@ def _record_carries(sha1: str, record: dict, declared: dict[str, set[str]]) -> b
|
||||
**{field: str(record.get(field) or "").lower() for field in ("md5", "sha256", "crc32")},
|
||||
}
|
||||
return any(
|
||||
actual[field] and (
|
||||
actual[field] in values
|
||||
or (field == "md5" and any(len(v) < 32 and actual[field].startswith(v) for v in values))
|
||||
)
|
||||
actual[field] and actual[field] in values
|
||||
for field, values in declared.items()
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user