Files
romm/backend/tests/handler/database
Georges-Antoine Assi 900fe515ea fix(sync): match RetroArch saves named after a ROM's files (#5445)
* fix(sync): match RetroArch saves named after a ROM's files

RetroArch names a save after the file it launched, so a disc or a
translation inside a multi-file game folder uploaded a save that matched
no ROM. When no ROM carries the name, saves now resolve to the ROM owning
a file with that stem. Those saves stay unslotted under their own name,
since a ROM's autosave lineage holds one save per core and the discs
would overwrite each other. States keep matching on the ROM name only,
because their slots are advertised under it.

Fixes #5364

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sync): write a case-variant reupload to the stored save's own file

Addresses Greptile review on #5445.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sync): match a stored save's name in any case on PostgreSQL

The RetroArch save lookup relied on MariaDB's case-insensitive collation, so
on PostgreSQL a reupload in another case created a second save instead of
replacing the stored one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:48:42 -05:00
..