mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 17:33:30 -05:00
fix: strip only a hash suffix off variant names
slots dropped the last extension of any .variants/ name, so a variant stored under its plain name (63 of them, aes.zip among them) was not the family of its primary and a platform declaring both at one path would read as a collision. The database already stripped an eight-hex suffix only; both now read one function.
This commit is contained in:
1 parent
6448a1ab3d
commit
fd6ae1f5c9
4 files changed
+44
-12
No files matched your search
@@ -771,6 +771,18 @@ def _resolve_agnostic(
|
||||
return None
|
||||
|
||||
|
||||
_VARIANT_SUFFIX = re.compile(r"\.[0-9a-f]{8}$")
|
||||
|
||||
|
||||
def variant_base_name(name: str) -> str:
|
||||
"""The name a .variants/ copy stands in for: naomi2.zip.da79eca4 -> naomi2.zip.
|
||||
|
||||
Only an eight-hex-digit suffix is a variant tag. A variant stored under
|
||||
its plain name (.variants/aes.zip) already is that name.
|
||||
"""
|
||||
return _VARIANT_SUFFIX.sub("", name)
|
||||
|
||||
|
||||
def _affinity_tokens(text: str) -> set[str]:
|
||||
return {
|
||||
token
|
||||
|
||||
Reference in new issue
Block a user