mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 10:37:54 -06:00
refactor: one reader of a declared destination
This commit is contained in:
1 parent
d55555f3e0
commit
825c527d11
8 files changed
+30
-33
No files matched your search
@@ -18,3 +18,10 @@ def sanitize_pack_path(raw: str) -> str:
|
||||
"""
|
||||
raw = raw.replace("\\", "/")
|
||||
return "/".join(p for p in raw.split("/") if p and p not in ("..", "."))
|
||||
|
||||
|
||||
def declared_destination(entry: dict) -> str:
|
||||
"""The destination a declaration names, its name when it names none,
|
||||
normalized as sanitize_pack_path does: the key the builder, the manifest
|
||||
and verify all file a declaration under."""
|
||||
return sanitize_pack_path(entry.get("destination", entry.get("name", "")))
|
||||
Reference in new issue
Block a user