mirror of
https://github.com/rommapp/romm.git
synced 2026-06-27 22:35:57 +00:00
Folder-stored disc games (the standard Redump .cue + .bin layout, .gdi sets, multi-bin, etc.) never matched RetroAchievements. roms_handler builds an `ra_path` ending in `/*` when the folder has no .chd, and RAHasherService only rescued that glob for folders containing archives. A folder of plain uncompressed tracks fell through, so the literal `*` reached RAHasher via create_subprocess_exec (no shell to expand it), which failed with "Could not open track" and stored an empty ra_hash. Resolve the `/*` glob to a single real file before spawning RAHasher: prefer a disc descriptor (.cue/.gdi/.m3u), which RAHasher follows to the referenced tracks, otherwise fall back to the largest file in the folder (raw .iso/.bin, or the main file of a multi-file cartridge set). This mirrors the existing "pick the largest .chd" handling for CHD folders. Fixes #3497. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>