Skip to content

Commit

Permalink
Delete all config files on settings_reset
Browse files Browse the repository at this point in the history
  • Loading branch information
ducalex committed Dec 20, 2021
2 parents 1b89ff7 + 1e6704a commit c66dafc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/retro-go/rg_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ static cJSON *json_root(const char *name)

void rg_settings_reset(void)
{
// Get rid of everything in RG_BASE_PATH_CONFIG...
// opendir(RG_BASE_PATH_CONFIG);
unlink(RG_BASE_PATH_CONFIG "/favorite.txt");
unlink(RG_BASE_PATH_CONFIG "/recent.txt");

cJSON_Delete(config_root);
config_root = cJSON_CreateObject();
unsaved_changes++;
Expand Down

0 comments on commit c66dafc

Please sign in to comment.