Attempt to fix NextUI (and other CFW platforms) save sync path resolution when local variants are mismatched - #269
Merged
Conversation
NextUI scanned installed ROMs under CFW keys such as gba while the metadata cache was indexed by RomM slugs such as GBA. This made every local ROM cache lookup miss and prevented remote-only save discovery even when the downloaded ROM basename exactly matched RomM. Resolve the inverse platform binding during NextUI scans and cover the real GBA/MGBA layout with a regression test. Preserve the emulator-specific save directory inferred from the installed ROM folder so a ROM launched from Game Boy Advance (MGBA) downloads into Saves/MGBA instead of the platform's default Saves/GBA. For subsequent updates, pair timestamped RomM download operations with the already validated local save by ROM and managed slot, retaining its exact filename, path, and emulator directory rather than constructing a second misplaced file. Add regression coverage modeled on the Final Fantasy Tactics Advance failure reproduced on a NextUI TrimUI Brick: initial remote-only discovery now carries MGBA forward, and a newer server save with a datetime-tagged filename overwrites the existing plain local save path. The full Go test suite passes in the project's official SDL-equipped build image.
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.
I ran into a problem where I was unable to get my Romm server to sync a save over to my NextUI device (TrimUI Brick). I am not completely sure what happened but I believe it to be the following sequence of events:
autosaveto ROMMFF) and tried syncing again. Nothing.After futzing around with the SQL Lite DB, it would appear that at some point along the way the sync manager was dropping saves in the GBA folder even though the ROM was in MGBA. It would seem that when pulling fresh, remote saves
Grout was refusing to pull them when using mGBA. Codex did manage to fix this over FTP when I gave it control. The following was generated by Codex and left untouched:
I am attaching this in case it is useful. I have run the tests via Docker but I don't know enough about the codebase to prove correctness. Let me know if this is useful at all.