refactor: fold destinations with one rule

comparable_destination moves to core.paths. Placed, placement_block,
the shared group merge of model.platforms and LauncherPlace.fold read it
in place of their own lower(). It also trims surrounding blanks and
slashes and folds with casefold: no destination, collection path or
launcher name differs under those rules today, so the output is the
same.
This commit is contained in:
Abdessamad Derraz committed 2026-11-20 20:03:26 +01:00
1 parent ca3ff1d4c5
commit 1c978f3083
7 files changed
+27 -23

No files matched your search

+2 -2
View File
@@ -9,7 +9,7 @@ try:
except ImportError:
yaml = None
from core.paths import PLATFORMS_DIR
from core.paths import PLATFORMS_DIR, comparable_destination
from model.sources import source_yaml
@@ -89,7 +89,7 @@ def _apply_shared_groups(config: dict, shared_groups: dict) -> None:
# Lakka and RetroPie run on Linux, and np2kai opens 2608_bd.wav beside
# System.dat's 2608_BD.WAV.
def fold(destination: str) -> str:
return destination.lower() if config.get("case_insensitive_fs") else destination
return comparable_destination(destination, bool(config.get("case_insensitive_fs")))
for system in config.get("systems", {}).values():
for group_name in system.get("includes", []):