mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-29 07:07:20 -05:00
fix: name the file existence mode finds
verify_entry_existence returned no path, so RetroArch, Lakka and RetroPie pages showed no Served by line. It now returns the resolved path as the hash modes do. verify.py --all prints the same bytes and its JSON is unchanged.
This commit is contained in:
1 parent
6cac923a91
commit
7c6af30a0c
3 files changed
+14
-3
No files matched your search
@@ -2380,7 +2380,7 @@ def _served_line(f: dict) -> str:
|
||||
if f.get("status") == "missing":
|
||||
return "Not held"
|
||||
if not path:
|
||||
# verify reports no path in existence mode: nothing to name.
|
||||
# A slot the pack fills from a release asset or leaves to the user.
|
||||
return ""
|
||||
sha1 = _collection_sha1_by_path().get(path, "")
|
||||
label = "Served by" if f.get("status") == "ok" else "Held, not the declared hash"
|
||||
|
||||
+3
-2
@@ -189,12 +189,13 @@ def verify_entry_existence(
|
||||
resolve_status: str = "",
|
||||
platform_display: str = "",
|
||||
) -> dict:
|
||||
"""RetroArch verification: path_is_valid(), a file that exists is OK."""
|
||||
"""RetroArch verification: path_is_valid(), a file that exists is OK.
|
||||
The result names the collection file found, as the hash modes do."""
|
||||
name = file_entry.get("name", "")
|
||||
required = file_entry.get("required", True)
|
||||
if not local_path:
|
||||
return {"name": name, "status": Status.MISSING, "required": required}
|
||||
result = {"name": name, "status": Status.OK, "required": required}
|
||||
result = {"name": name, "status": Status.OK, "required": required, "path": local_path}
|
||||
if resolve_status == "hash_mismatch":
|
||||
# The frontend reads no bytes, so the file stays, and the declared hash
|
||||
# it contradicts is reported, as the pack does.
|
||||
|
||||
Reference in new issue
Block a user