Skip to content

Fix: don't duplicate output path for multi-roms that include path#1864

Merged
emmercm merged 6 commits intoemmercm:mainfrom
JosVerheij:fix/smdb-multifile-structure
Apr 17, 2026
Merged

Fix: don't duplicate output path for multi-roms that include path#1864
emmercm merged 6 commits intoemmercm:mainfrom
JosVerheij:fix/smdb-multifile-structure

Conversation

@JosVerheij
Copy link
Copy Markdown
Contributor

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
@emmercm
Copy link
Copy Markdown
Owner

emmercm commented Mar 28, 2026

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.

@JosVerheij
Copy link
Copy Markdown
Contributor Author

No problem at all! I'm happy to contribute. Thanks for your great project. It's great to see it moving

@emmercm emmercm merged commit 48f9121 into emmercm:main Apr 17, 2026
63 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.77%. Comparing base (0cefe2b) to head (a42fb03).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants