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

ensure flip_world folder is created

JBlanked 1 год назад
Родитель
Сommit
431ffd6c5e
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      flip_storage/storage.c

+ 4 - 2
flip_storage/storage.c

@@ -170,11 +170,13 @@ bool save_char(
     }
     // Create the directory for saving settings
     char directory_path[256];
-    snprintf(directory_path, sizeof(directory_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/data");
+    snprintf(directory_path, sizeof(directory_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world");
 
     // Create the directory
     Storage *storage = furi_record_open(RECORD_STORAGE);
     storage_common_mkdir(storage, directory_path);
+    snprintf(directory_path, sizeof(directory_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/data");
+    storage_common_mkdir(storage, directory_path);
 
     // Open the settings file
     File *file = storage_file_alloc(storage);
@@ -659,4 +661,4 @@ static bool load_flip_social_settings(
     furi_record_close(RECORD_STORAGE);
 
     return true;
-}
+}