Wargus / wargus

Importer and scripts for Warcraft II: Tides of Darkness, the expansion Beyond the Dark Portal, and Aleonas Tales
GNU General Public License v2.0
355 stars 55 forks source link

Save/load dialog working with filenames inconsistently #391

Open side2k opened 2 years ago

side2k commented 2 years ago

Describe the bug

Savegames in save/load dialog are displayed fully, with extensions. But when you click on an existing filename to overwrite it, its full name is put into the save name input, and when user submits it by either clicking on a Save button or double clicking on an existing entry, additional .gz is added to what was in the save name input.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Save' dialog
  2. Enter test name
  3. Click on 'Save'
  4. Do any noticeable change in game (move unit, etc)
  5. Go to Save dialog again
  6. See test.sav.gz in the list, click on it twice
  7. Go to Load dialog.
  8. See a single test.sav.gz in the savegames list, double click it
  9. See that a first save is loaded, with no change from p.4
  10. Look into the savegame directory (~/.stratagus/wc2/save or whatever it is on your platform) - you'll see test.sav.gz with an older timestamp and test.sav.gz.gz with a newer timestamp. The first file is the one that is displayed in the Save/Load dialogs, but the second one is thats actually gets written when you double click on an existing entry in a Save dialog.

Expected behavior

Screenshots and Logs

Desktop (please complete the following information):