Start removing CFG_PATH() / .config, add MNT_PATH() macro

This commit is contained in:
Willy-JL
2024-08-07 02:35:09 +02:00
parent bcf37a1bd4
commit 1b2d173d63
7 changed files with 16 additions and 20 deletions

View File

@@ -5,7 +5,7 @@
extern "C" {
#endif
#define MAINMENU_APPS_PATH CFG_PATH("mainmenu_apps.txt")
#define MAINMENU_APPS_PATH INT_PATH(".mainmenu_apps.txt")
typedef struct LoaderMenu LoaderMenu;

View File

@@ -14,18 +14,17 @@ extern "C" {
#define STORAGE_INT_PATH_PREFIX "/int"
#define STORAGE_EXT_PATH_PREFIX "/ext"
#define STORAGE_MNT_PATH_PREFIX "/mnt"
#define STORAGE_ANY_PATH_PREFIX "/any"
#define STORAGE_MNT_PATH_PREFIX "/mnt"
#define STORAGE_APP_DATA_PATH_PREFIX "/data"
#define STORAGE_APP_ASSETS_PATH_PREFIX "/assets"
#define STORAGE_CFG_PATH_PREFIX STORAGE_EXT_PATH_PREFIX "/.config"
#define INT_PATH(path) STORAGE_INT_PATH_PREFIX "/" path
#define EXT_PATH(path) STORAGE_EXT_PATH_PREFIX "/" path
#define ANY_PATH(path) STORAGE_ANY_PATH_PREFIX "/" path
#define MNT_PATH(path) STORAGE_MNT_PATH_PREFIX "/" path
#define APP_DATA_PATH(path) STORAGE_APP_DATA_PATH_PREFIX "/" path
#define APP_ASSETS_PATH(path) STORAGE_APP_ASSETS_PATH_PREFIX "/" path
#define CFG_PATH(path) STORAGE_CFG_PATH_PREFIX "/" path
#define RECORD_STORAGE "storage"

View File

@@ -611,13 +611,6 @@ void storage_process_alias(
storage_process_common_mkdir(app, int_on_ext_path);
}
furi_string_free(int_on_ext_path);
} else if(furi_string_start_with(path, STORAGE_CFG_PATH_PREFIX)) {
// Create config folder if it doesn't exist
FuriString* config_path = furi_string_alloc_set(STORAGE_CFG_PATH_PREFIX);
if(create_folders && storage_process_common_stat(app, config_path, NULL) != FSE_OK) {
storage_process_common_mkdir(app, config_path);
}
furi_string_free(config_path);
}
}