mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 01:13:30 -05:00
fix: write no platform size beside a truth hash
This commit is contained in:
1 parent
5f62597e6f
commit
db179faf82
2 files changed
+22
-1
No files matched your search
@@ -153,9 +153,15 @@ class NativeFile:
|
||||
truth's size is only taken when the truth also speaks for the hash:
|
||||
a name-matched 480-byte fbneo boot.bin turned RomM's Dreamcast
|
||||
boot.bin into size 480 beside its 2 MB md5, which never verifies.
|
||||
When the truth contradicts the platform's hash, the platform's size
|
||||
describes the dump the truth rejects: geolith's neocdz.zip md5 went
|
||||
out beside System.dat's 953078 bytes, a record no file satisfies.
|
||||
"""
|
||||
source = self._identity_source()
|
||||
order = (self.platform, self.truth) if source == "platform" else (self.truth, self.platform)
|
||||
order = {
|
||||
"platform": (self.platform, self.truth),
|
||||
"truth": (self.truth,),
|
||||
}.get(source, (self.truth, self.platform))
|
||||
for entry in order:
|
||||
if entry and entry.get("size"):
|
||||
return _single_size(entry["size"])
|
||||
|
||||
Reference in new issue
Block a user