Skip to content

Conversation

@wizzomafizzo
Copy link
Member

Summary

  • Fix Neo Geo scanner incorrectly identifying files inside zip archives as separate games
  • Zips matching romsets.xml are games - their contents should not appear as separate entries
  • Zips not matching romsets.xml are folders - their contents are valid games

Changes

  • Extract filterNeoGeoZipContents helper function for testability
  • Split scanner into two passes: first load all romsets, then filter and add games
  • Filter paths containing .zip/ if the zip name matches romsets.xml
  • Make lookups case-insensitive for robustness
  • Add comprehensive tests for the filtering logic

The Neo Geo scanner was incorrectly identifying files inside zip archives
as separate games when the zip itself is a game (matches romsets.xml).

Neo Geo supports two types of zips:
- Zip as game: matches romsets.xml, should not scan inside
- Zip as folder: doesn't match romsets.xml, contents are valid games

The fix:
- Extract filterNeoGeoZipContents helper for testability
- Split scanner into two passes: load all romsets, then filter and add
- Filter paths containing .zip/ if the zip name matches romsets.xml
- Make lookups case-insensitive for robustness

Fixes issue where mslug.zip/mslug.rom appeared as a separate game
alongside mslug.zip itself.
@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 63.15789% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/platforms/mister/platform.go 63.15% 6 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@wizzomafizzo wizzomafizzo merged commit 28b63a5 into main Dec 18, 2025
10 checks passed
@wizzomafizzo wizzomafizzo deleted the fix/neogeo-zip-scanner branch December 18, 2025 07:15
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