refactor: one rule for system and maker names

packs.naming.system_display_name names a system in a pack file name,
read by system_tag in place of its copy of the loop. names_manufacturer
spells a maker through model.collection.manufacturer_slug, and
resolve.identity reads the maker folder with ownership.maker_of_relative,
the rule maker_folder applies. No behavior change.
This commit is contained in:
Abdessamad Derraz committed 2026-11-20 20:03:26 +01:00
1 parent 6b3a588231
commit b679edb133
5 files changed
+27 -24

No files matched your search

+2 -2
View File
@@ -20,6 +20,7 @@ from pathlib import Path
from core.paths import BIOS_DIR
from core.hashing import file_digest
from resolve.ownership import maker_of_relative
# A manufacturer directory holding files that genuinely belong to several
@@ -60,8 +61,7 @@ class Duplicate:
def _manufacturer(path: Path, root: Path) -> str:
"""The vendor directory a path sits under, relative to the scanned root."""
parts = path.relative_to(root).parts
return parts[0] if len(parts) > 1 else ""
return maker_of_relative(path.relative_to(root).as_posix()) or ""
def scan(bios_dir: str = BIOS_DIR) -> list[Duplicate]: