openfodder icon indicating copy to clipboard operation
openfodder copied to clipboard

Saving twice with the same name leads to 2 separate save files

Open tremby opened this issue 10 months ago • 1 comments

Describe the bug If I save with the same name a second time, I get 2 separate save files with the same name.

To Reproduce Steps to reproduce the behavior:

  1. Save game as "abc"
  2. Save game again as "abc"
  3. Go to "load"
  4. See multiple files called "abc"

Expected behavior Either an error ("file already exists" or something, maybe with the option to cancel or overwrite), or just silently overwriting the same file.

Screenshots

Desktop (please complete the following information):

  • OS: Linux
  • Version Ubuntu 22.04

Additional context If it's expected that there can be many saves with the same name, having the date/time on them would be helpful.

tremby avatar Apr 01 '24 05:04 tremby

Not really sure if this should be classified as a bug or not, as its deliberate and comes from adding support for CF1/2/Demos, but probably also unexpected in the same campaign to have multiple saves with the same name. Adding date/time isn't really feasible due to limitations in screen space

Guess some code that loops all save games and looks for existing saves with the entered name is probably whats needed here

segrax avatar Apr 01 '24 08:04 segrax