Fix: don't duplicate output path for multi-roms that include path #1864
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.