Просмотр исходного кода

free storage after removing file

jblanked 9 месяцев назад
Родитель
Сommit
ac8060df00
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      callback/game.c

+ 1 - 1
callback/game.c

@@ -633,9 +633,9 @@ void game_run(FlipWorldApp *app)
                 storage_common_mkdir(storage, directory_path);
                 snprintf(directory_path, sizeof(directory_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/pvp/lobbies");
                 storage_common_mkdir(storage, directory_path);
-                furi_record_close(RECORD_STORAGE);
                 snprintf(fhttp->file_path, sizeof(fhttp->file_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/pvp/pvp_lobbies.json");
                 storage_simply_remove_recursive(storage, fhttp->file_path); // ensure the file is empty
+                furi_record_close(RECORD_STORAGE);
                 fhttp->save_received_data = true;
                 // 2 players max, 10 lobbies
                 return flipper_http_request(fhttp, GET, "https://www.jblanked.com/flipper/api/world/pvp/lobbies/2/10/", "{\"Content-Type\":\"application/json\"}", NULL);