[wesnoth-commits] [wesnoth/wesnoth] 430d64: Fix save_index issues

grz0 noreply at github.com
Thu Apr 22 05:23:27 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 430d64040804898f1aa4a7e306dd5af627c760f6
      https://github.com/wesnoth/wesnoth/commit/430d64040804898f1aa4a7e306dd5af627c760f6
  Author: Grzegorz Halat <grzegorz.halat at gmail.com>
  Date:   2021-04-22 (Thu, 22 Apr 2021)

  Changed paths:
    M src/save_index.cpp
    M src/save_index.hpp
    M src/savegame.cpp

  Log Message:
  -----------
  Fix save_index issues

This commmit fixes some issues related to save_index:
* fixes a bug in save_index_class::remove() method.
  The method incorrectly tries to remove an attribute from root config instead of removing 'save' children.
  In effect, save files were not being removed from the save_index file.
* removes call to save_index_manager_->remove() in savegame::finish_save_game
  This call to remove() is incorrect and has no effect except causing unneeded call to write_save_index().
* introduces a new clean_up_index() method in save_index_class.
  The method removes non-existing save files from the index. Clean up is triggered only during the first
  synchronisation of the index to disc and only if the index has more save files than found on disk.





More information about the Commits mailing list