Skip to content

Conversation

@JosVerheij
Copy link

don't duplicate output path for multi-roms that include path structure in game name (ie. SMDBs)

Normally, multi-rom gamefiles are combined under a single directory. Hardware Target Gamedatabase SMDBs include path structure in their game names. The intended output path is effectively hardcoded within this file. For multi-roms this was a problem as the entire file path was duplicated, such that you'd have Collections/Top10/Snowboarders/Collections/Top10/Snowboarders (Track 01).bin.

This commit adds a check for any path separators in the game name in outputFactory.ts. If any path separators are found, it assumes that game names already contain the intended and are no longer combined into their 'game name' subdirectory.

Here be dragons: this change applies to all multi-file roms that contain path separators (ie / or \\). For the common DAT formats, this seems to be fine as the romname/gamename never include any path information anyway. There may certainly be cases where this causes unwanted behaviour though. I have not checked nor considered every possible option ..it works for the standard (Redump/TOSEC etc) datfiles, as well as SMDB.

Alternatives to this solution may be setting a flag for HTGDB SMDBs specifically, or adding (intended) path information to the generated Logiqx files.

…ucture in game name (ie. SMDBs)

Normally, multi-rom gamefiles are combined under a single directory. Hardware Target Gamedatabase SMDBs include path structure in their game names. The intended output path is effectively hardcoded within this file. For multi-roms this was a problem as the entire file path was duplicated, such that you'd have `Collections/Top10/Snowboarders/Collections/Top10/Snowboarders (Track 01).bin`.

This commit adds a check for any path separators in the game name in `outputFactory.ts`. If any path separators are found, it assumes that game names already contain the intended and are no longer combined into their 'game name' subdirectory.
@github-actions github-actions bot changed the title fix: don't duplicate output path for multi-roms that include path Fix: don't duplicate output path for multi-roms that include path Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant