Fix: don't duplicate output path for multi-roms that include path#1864
Merged
emmercm merged 6 commits intoemmercm:mainfrom Apr 17, 2026
Merged
Fix: don't duplicate output path for multi-roms that include path#1864emmercm merged 6 commits intoemmercm:mainfrom
emmercm merged 6 commits intoemmercm:mainfrom
Conversation
…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.
Owner
|
Thank you for the contribution @JosVerheij, the change makes sense. Apologies that it's taken so long to get accepted. I'll get it rebased and merged. |
Contributor
Author
|
No problem at all! I'm happy to contribute. Thanks for your great project. It's great to see it moving |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1864 +/- ##
=======================================
Coverage 90.77% 90.77%
=======================================
Files 161 161
Lines 10575 10576 +1
Branches 2607 2608 +1
=======================================
+ Hits 9599 9600 +1
Misses 872 872
Partials 104 104 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.