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 @@ from __future__ import annotations
from collections.abc import Iterable
from dataclasses import dataclass
from core.paths import sanitize_pack_path
from core.paths import comparable_destination, sanitize_pack_path
from resolve.validation import read_from_save_dir
@@ -177,7 +177,7 @@ def placement_block(
"""
if dest in seen_files:
return "taken"
if case_insensitive and dest.lower() in seen_lower:
if case_insensitive and comparable_destination(dest) in seen_lower:
return "case_twin"
if has_path_conflict(dest, seen_files, seen_parents):
return "path_conflict"