fix: a size kept in bios_db.json is not removed

When the truth accepts the BiosDB hash but none of its sizes fits, the MiSTer render keeps the entry's size beside the hash, and the report still counted a size removed. A size the truth does not state is no longer reported as changed.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 04:00:47 +01:00
1 parent 290c0b73ff
commit 39e6afbeb2
2 files changed
+30

No files matched your search

+4
View File
@@ -83,6 +83,10 @@ class Exporter(BaseExporter):
written = getattr(self, "_written", None)
if written is not None and id(fe) not in written:
return False
if field_name == "size" and not fe.size():
# The render writes a size only when the truth states one, and
# otherwise keeps MiSTer's beside the hash: nothing is removed.
return False
return super().states(fe, field_name)
def written(self, fe: NativeFile, field_name: str) -> str: