feat: offer the games of a handheld's card

An ArkOS EASYROMS card plugged into a computer was never offered "for
the games on this card": its console folders sit beside bios, with no
roms folder above. A games part now counts as a card that may hold
games.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 21:01:23 +01:00
1 parent 65a5dfecc7
commit 68c8dca41d
4 files changed
+11 -4

No files matched your search

+6 -2
View File
@@ -9831,11 +9831,15 @@ def games_root(setup: dict, bios_path: Path) -> Path | None:
def _may_hold_games(bios_path: Path) -> bool:
"""Whether a rom folder could sit near this BIOS folder, said without the
network: a folder named roms in it or up to two levels above it, or a
path that runs through one (roms, games)."""
network: a folder named roms in it or up to two levels above it, a path
that runs through one (roms, games), or a handheld's games part, whose
console folders sit beside bios (ArkOS's EASYROMS plugged into a
computer was never offered its games)."""
holders = [bios_path, *list(bios_path.absolute().parents)[:2]]
if any(part.casefold() in ("roms", "games") for part in bios_path.absolute().parts[-3:]):
return True
if games_part(bios_path.parent) is not None:
return True
return any(entry.name.casefold() == "roms" and _entry_is_dir(entry)
for holder in holders for entry in _list_dir(holder))