Delete savestate thumbnails if needed (#16836)
Apply garbage collection also for the savestate thumbnails.
This commit is contained in:
parent
38b3ba4e00
commit
c057c8bfb2
|
@ -1558,7 +1558,13 @@ void command_event_set_savestate_garbage_collect(
|
||||||
* the risk of deleting multiple incorrect files
|
* the risk of deleting multiple incorrect files
|
||||||
* in case of accident */
|
* in case of accident */
|
||||||
if (!string_is_empty(oldest_save) && (cnt > max_to_keep))
|
if (!string_is_empty(oldest_save) && (cnt > max_to_keep))
|
||||||
|
{
|
||||||
filestream_delete(oldest_save);
|
filestream_delete(oldest_save);
|
||||||
|
/* Construct the save state thumbnail name
|
||||||
|
* and delete that one as well. */
|
||||||
|
i = strlcpy(state_dir,oldest_save,PATH_MAX_LENGTH);
|
||||||
|
strlcpy(state_dir + i,".png",STRLEN_CONST(".png")+1);
|
||||||
|
}
|
||||||
|
|
||||||
dir_list_free(dir_list);
|
dir_list_free(dir_list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue