From ff4dbdaafab11074484920d3e3c95776bf9511f2 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Thu, 6 Feb 2025 01:30:29 +0000 Subject: [PATCH] Cross Remote: Make app dir on open --- cross_remote/helpers/xremote_storage.c | 2 +- cross_remote/xremote.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cross_remote/helpers/xremote_storage.c b/cross_remote/helpers/xremote_storage.c index c63e39c33..c67513f74 100644 --- a/cross_remote/helpers/xremote_storage.c +++ b/cross_remote/helpers/xremote_storage.c @@ -30,7 +30,7 @@ void xremote_save_settings(void* context) { } // Open File, create if not exists - if(!storage_common_stat(storage, XREMOTE_SETTINGS_SAVE_PATH, NULL) == FSE_OK) { + if(storage_common_stat(storage, XREMOTE_SETTINGS_SAVE_PATH, NULL) != FSE_OK) { FURI_LOG_D( TAG, "Config file %s is not found. Will create new.", XREMOTE_SETTINGS_SAVE_PATH); if(storage_common_stat(storage, CONFIG_FILE_DIRECTORY_PATH, NULL) == FSE_NOT_EXIST) { diff --git a/cross_remote/xremote.c b/cross_remote/xremote.c index 5bab57950..e82c4b51e 100644 --- a/cross_remote/xremote.c +++ b/cross_remote/xremote.c @@ -207,6 +207,10 @@ int32_t xremote_app(void* p) { furi_hal_power_suppress_charge_enter(); + Storage* storage = furi_record_open(RECORD_STORAGE); + storage_common_mkdir(storage, XREMOTE_APP_FOLDER); + furi_record_close(RECORD_STORAGE); + if(strcmp(subghz_txrx_radio_device_get_name(app->subghz->txrx), "cc1101_ext") != 0) { InfraredSettings settings = {0}; infrared_settings_load(&settings);