Skip to content

Commit

Permalink
Cross Remote: Make app dir on open
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Feb 6, 2025
1 parent a0323eb commit ff4dbda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cross_remote/helpers/xremote_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions cross_remote/xremote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ff4dbda

Please sign in to comment.