mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-26 19:38:52 -06:00
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:
1 parent
ca3ff1d4c5
commit
1c978f3083
7 files changed
+27
-23
No files matched your search
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user