فهرست منبع

Revert "Cross Remote: Make app dir on open"

This reverts commit ff4dbdaafab11074484920d3e3c95776bf9511f2.
Willy-JL 10 ماه پیش
والد
کامیت
b8711ee2e9
2فایلهای تغییر یافته به همراه1 افزوده شده و 5 حذف شده
  1. 1 1
      cross_remote/helpers/xremote_storage.c
  2. 0 4
      cross_remote/xremote.c

+ 1 - 1
cross_remote/helpers/xremote_storage.c

@@ -30,7 +30,7 @@ void xremote_save_settings(void* context) {
     }
     }
 
 
     // Open File, create if not exists
     // 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(
         FURI_LOG_D(
             TAG, "Config file %s is not found. Will create new.", XREMOTE_SETTINGS_SAVE_PATH);
             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) {
         if(storage_common_stat(storage, CONFIG_FILE_DIRECTORY_PATH, NULL) == FSE_NOT_EXIST) {

+ 0 - 4
cross_remote/xremote.c

@@ -207,10 +207,6 @@ int32_t xremote_app(void* p) {
 
 
     furi_hal_power_suppress_charge_enter();
     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) {
     if(strcmp(subghz_txrx_radio_device_get_name(app->subghz->txrx), "cc1101_ext") != 0) {
         InfraredSettings settings = {0};
         InfraredSettings settings = {0};
         infrared_settings_load(&settings);
         infrared_settings_load(&settings);