mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-19 09:53:10 -05:00
fix: keep a MiSTer record whole without an md5
This commit is contained in:
1 parent
6458a927d4
commit
c254115647
2 files changed
+26
-3
No files matched your search
@@ -93,10 +93,14 @@ class Exporter(BaseExporter):
|
||||
fe = indexed.get(path)
|
||||
if fe is None:
|
||||
continue
|
||||
self._written.add(id(fe))
|
||||
md5 = fe.hash("md5")
|
||||
if md5:
|
||||
entry["hash"] = md5
|
||||
if not md5:
|
||||
# The record is checked by its md5: where the truth takes the
|
||||
# entry without one, a new size beside the old hash describes
|
||||
# no file, and the entry is left as MiSTer wrote it.
|
||||
continue
|
||||
self._written.add(id(fe))
|
||||
entry["hash"] = md5
|
||||
size = fe.size()
|
||||
if size:
|
||||
entry["size"] = size
|
||||
|
||||
Reference in new issue
Block a user