romm icon indicating copy to clipboard operation
romm copied to clipboard

[Bug] Save files over-written

Open Moonraka opened this issue 8 months ago • 1 comments

RomM version 3.8.3

Describe the bug Noticed a problem with Romm save system. If you upload two save files with the same name in the save tab, then the first file will be overwritten by the second one in the file system. All saves for a platform are stored in the same folder, which is illogical. User lost 20 Windows game saves thinking they were safe with the Romm save manager. But then user realized that Romm overwrote 29 of my saves with the 30th one that had the same name save.zip. Each archive was uploaded to a different game.

To Reproduce Steps to reproduce the behavior:

Upload save from the WebUI

Expected behavior Expected to keep save files seperated

the thing if that if you upload a save file to one game, lets say mysave.zip and then you upload a savefile to other game of the same platform, with that same name mysave.zip, it will overwrite the save file of the first game

Reported by Users Gargonuta and SnareGhost

Moonraka avatar Apr 17 '25 22:04 Moonraka

I'm dealing with another issue regarding user permissions and save files. But I saw this issue and figured I could provide some evidence.

Below is the output of the find command where its showing everything under the assets/users directory. Save files will be under the assets/users/$USER_ID/saves/$PLATFORM directory. The destination file name will be the same as the source.

romm@desktop1:~/romm/assets/users$ find .
.
./557365723a31
./557365723a31/states
./557365723a31/states/n64
./557365723a31/states/n64/mupen64plus_next
./557365723a31/states/n64/mupen64plus_next/Super Mario 64 (USA) [2025-04-06 15-06-32-444].state
./557365723a31/states/gb
./557365723a31/states/gb/gambatte
./557365723a31/states/gb/gambatte/Pokemon - Yellow Version - Special Pikachu Edition (USA, Europe) (GBC,SGB Enhanced) [2025-04-09 02-50-00-080].state
...
./557365723a31/saves
./557365723a31/saves/gb
./557365723a33
./557365723a33/saves
./557365723a33/saves/gb
./557365723a33/saves/gb/Pokemon - Yellow Version - Special Pikachu Edition (USA, Europe) (GBC,SGB Enhanced).srm

The interesting thing is that state files, that are generated via Save-Exit process in EmulatorJS, will be have a timestamp in the name.

demonpig avatar Apr 20 '25 03:04 demonpig

This is fixed as of 3.10.1!

gantoine avatar Jun 10 '25 03:06 gantoine