[FL-3055] Getter for application data path (#2181)
* Threads: application id * Unit tests: appsdata getter test * Unit tests: moar test cases for appsdata getter * Unit tests: remove folders after test * Storage: dir_is_exist, migrate, + unit_tests * Plugins: migration * Storage: common_exists, moar unit_tests 4 "common_migrate", "common_migrate" and "common_merge" bugfixes * Storage: use FuriString for path handling * Storage API: send caller thread id with path * Storage: remove StorageType field in storage file list * Storage: simplify processing * Storage API: send caller thread id with path everywhere * Storage: /app alias, unit tests and path creation * Storage, path helper: remove unused * Examples: app data example * App plugins: use new VFS path * Storage: file_info_is_dir * Services: handle alias if the service accepts a path. * App plugins: fixes * Make PVS happy * Storage: fix storage_merge_recursive * Storage: rename process_aliases to resolve_path. Rename APPS_DATA to APP_DATA. * Apps: use predefined macro instead of raw paths. Example Apps Data: README fixes. * Storage: rename storage_common_resolve_path to storage_common_resolve_path_and_ensure_app_directory * Api: fix version * Storage: rename alias message * Storage: do not create app folders in path resolving process in certain cases. --------- Co-authored-by: Astra <93453568+Astrrra@users.noreply.github.com> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
#include "spi_mem_app_i.h"
|
||||
|
||||
void spi_mem_file_create_folder(SPIMemApp* app) {
|
||||
if(!storage_simply_mkdir(app->storage, SPI_MEM_FILE_FOLDER)) {
|
||||
dialog_message_show_storage_error(app->dialogs, "Cannot create\napp folder");
|
||||
}
|
||||
}
|
||||
|
||||
bool spi_mem_file_delete(SPIMemApp* app) {
|
||||
return (storage_simply_remove(app->storage, furi_string_get_cstr(app->file_path)));
|
||||
}
|
||||
@@ -13,7 +7,7 @@ bool spi_mem_file_delete(SPIMemApp* app) {
|
||||
bool spi_mem_file_select(SPIMemApp* app) {
|
||||
DialogsFileBrowserOptions browser_options;
|
||||
dialog_file_browser_set_basic_options(&browser_options, SPI_MEM_FILE_EXTENSION, &I_Dip8_10px);
|
||||
browser_options.base_path = SPI_MEM_FILE_FOLDER;
|
||||
browser_options.base_path = STORAGE_APP_DATA_PATH_PREFIX;
|
||||
bool success =
|
||||
dialog_file_browser_show(app->dialogs, app->file_path, app->file_path, &browser_options);
|
||||
return success;
|
||||
|
||||
Reference in New Issue
Block a user