mirror of
https://github.com/rommapp/romm.git
synced 2026-12-03 02:24:09 +01:00
Multi-file roms (e.g. multi-disk Amiga games) failed to launch in the EmulatorJS player with "Unsupported file format: ''", while single-file roms on the same platform worked. EmulatorJS derives the on-disk filename it writes to the emulator FS from the last path segment of the game URL, and the core determines the disk format from that filename's extension. getDownloadPath used the ROM-level fs_name for that segment. For multi-file roms the rom is a folder, so fs_name has no extension, and the core received an extension-less file. When a single file is selected, use that file's real name (extension included) as the content path segment instead of fs_name. The backend already serves the correct file for a single file_ids value and only uses the path segment for zip/m3u naming, so multi-file and no-selection cases are unchanged. Fixes #3746 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>