fix: correct type and path fields across 58 emulator profiles

49 libretro cores had type: game/utility/test instead of type: libretro,
breaking the all_libretro filtering in resolve_platform_cores and
excluding them from platform packs (e.g. cannonball missing from
RetroArch). core_classification already carries the descriptive role.

9 profiles with subdirectory-loading cores (cannonball/, nxengine/,
Citra/sysdata/, mame2003/, mame2003-plus/, mame2010/) now have path:
fields so cross-reference places files at the correct destination.

resolve_local_file now tries basename when name contains a path
separator (e.g. res/tilemap.bin -> tilemap.bin), fixing resolution
of files with subdirectory names.
This commit is contained in:
Abdessamad Derraz
2026-03-29 09:53:46 +02:00
parent 36f6ad1379
commit b7528a71e7
58 changed files with 125 additions and 49 deletions

View File

@@ -313,6 +313,13 @@ def resolve_local_file(
aliases = file_entry.get("aliases", [])
names_to_try = [name] + [a for a in aliases if a != name]
# When name contains a path separator (e.g. "res/tilemap.bin"), also
# try the basename since by_name indexes filenames without directories
if "/" in name:
name_base = name.rsplit("/", 1)[-1]
if name_base and name_base not in names_to_try:
names_to_try.append(name_base)
# When dest_hint contains a path, also try its basename as a name
# (handles emulator profiles where name: is descriptive and path: is
# the actual filename, e.g. name: "MDA font ROM", path: "mda.rom")