Browse Source

ensure flip_world folder is created

JBlanked 1 year ago
parent
commit
431ffd6c5e
1 changed files with 4 additions and 2 deletions
  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;
-}
+}