mirror of
https://github.com/rommapp/romm.git
synced 2026-12-02 10:08:40 +01:00
States have no `slot` column (unlike saves), so a state created through RomM's own web player -- named with a display label and timestamp, not a RetroArch slot number -- was surfaced in the cloud-sync manifest under its raw file name. Verified live: RetroArch's Load State menu only ever offers numbered slots 0-999, so a synced file named otherwise downloads successfully but is never reachable from that menu. Mirrors the reasoning already used for the retroarch-webdav-romm shim project's manifest builder: states are grouped by (rom, emulator, slot suffix) via the file name's trailing .state/.state<N>/.state.auto pattern, and the newest state in each bucket -- regardless of whether it came from RetroArch itself or the web player -- is advertised under the canonical name RetroArch's own upload for that slot would carry. GET/DELETE resolve that canonical name back to the same bucket via resolve_state_by_slot, so serving and deleting agree with what the manifest advertised even when the underlying row's real file name differs.