MX 2 лет назад
Родитель
Сommit
26f9ae5fa8

+ 1 - 1
base_pack/nfc_maker/scenes/nfc_maker_scene_result.c

@@ -17,7 +17,7 @@ void nfc_maker_scene_result_on_enter(void* context) {
 
     FlipperFormat* file = flipper_format_file_alloc(furi_record_open(RECORD_STORAGE));
     FuriString* path = furi_string_alloc();
-    furi_string_printf(path, NFC_APP_FOLDER "/%s" NFC_APP_EXTENSION, app->save_buf);
+    furi_string_printf(path, NFC_APP_FOLDER "/%s" NFC_APP_FILENAME_EXTENSION, app->save_buf);
 
     uint32_t pages = 135;
     size_t size = pages * 4;

+ 1 - 1
base_pack/nfc_maker/scenes/nfc_maker_scene_save.c

@@ -27,7 +27,7 @@ void nfc_maker_scene_save_on_enter(void* context) {
         true);
 
     ValidatorIsFile* validator_is_file =
-        validator_is_file_alloc_init(NFC_APP_FOLDER, NFC_APP_EXTENSION, NULL);
+        validator_is_file_alloc_init(NFC_APP_FOLDER, NFC_APP_FILENAME_EXTENSION, NULL);
     nfc_maker_text_input_set_validator(text_input, validator_is_file_callback, validator_is_file);
 
     view_dispatcher_switch_to_view(app->view_dispatcher, NfcMakerViewTextInput);

+ 1 - 1
non_catalog_apps/flipperzero_vb_migrate/scenes/vb_migrate_scene_from_app.c

@@ -246,7 +246,7 @@ static void vb_migrate_scene_from_app_set_state(VbMigrate* inst, FromAppState st
             // Save the tag
             inst->next_id = vb_migrate_get_next_id(inst, inst->text_store, inst->next_id, false);
             FuriString* save_path = furi_string_alloc_printf(
-                VB_MIGRATE_CAPTURE_FORMAT, inst->next_id, NFC_APP_EXTENSION);
+                VB_MIGRATE_CAPTURE_FORMAT, inst->next_id, NFC_APP_FILENAME_EXTENSION);
             if(vb_migrate_save_nfc(inst, inst->text_store, furi_string_get_cstr(save_path))) {
                 view_dispatcher_send_custom_event(
                     inst->view_dispatcher, FromAppEventTypeCaptureSaveSuccess);

+ 1 - 1
non_catalog_apps/flipperzero_vb_migrate/scenes/vb_migrate_scene_to_app.c

@@ -195,7 +195,7 @@ static void vb_migrate_scene_to_app_load_capture(VbMigrate* inst, bool go_next)
         uint32_t state = scene_manager_get_scene_state(inst->scene_manager, VbMigrateSceneToApp);
         inst->next_id = vb_migrate_get_next_id(inst, inst->text_store, inst->next_id, true);
         FuriString* temp_str =
-            furi_string_alloc_printf(VB_MIGRATE_CAPTURE_FORMAT, inst->next_id, NFC_APP_EXTENSION);
+            furi_string_alloc_printf(VB_MIGRATE_CAPTURE_FORMAT, inst->next_id, NFC_APP_FILENAME_EXTENSION);
 
         vb_migrate_show_loading_popup(inst, true);
         if(vb_migrate_load_nfc(inst, inst->text_store, furi_string_get_cstr(temp_str))) {

+ 3 - 3
non_catalog_apps/flipperzero_vb_migrate/vb_migrate.c

@@ -102,7 +102,7 @@ bool vb_migrate_delete(VbMigrate* inst, const char* dev_name, bool whole_vb) {
             FuriString* file_path = furi_string_alloc();
             while(storage_dir_read(dir_handle, &file_info, name, sizeof(name))) {
                 // Files that is .nfc, but is not template
-                if(!(file_info.flags & FSF_DIRECTORY) && strstr(name, NFC_APP_EXTENSION) &&
+                if(!(file_info.flags & FSF_DIRECTORY) && strstr(name, NFC_APP_FILENAME_EXTENSION) &&
                    !strstr(name, VB_MIGRATE_TEMPLATE_NAME)) {
                     furi_string_printf(file_path, "%s/%s", furi_string_get_cstr(dir_path), name);
                     deleted =
@@ -131,7 +131,7 @@ int vb_migrate_count_captured_mons(VbMigrate* inst, const char* dev_name) {
         char name[256];
         while(storage_dir_read(dir_handle, &file_info, name, sizeof(name))) {
             // Files that is .nfc, but is not template
-            if(!(file_info.flags & FSF_DIRECTORY) && strstr(name, NFC_APP_EXTENSION) &&
+            if(!(file_info.flags & FSF_DIRECTORY) && strstr(name, NFC_APP_FILENAME_EXTENSION) &&
                !strstr(name, VB_MIGRATE_TEMPLATE_NAME))
                 ++count;
         }
@@ -153,7 +153,7 @@ int vb_migrate_get_next_id(VbMigrate* inst, const char* dev_name, int i, bool is
             "%s/" VB_MIGRATE_CAPTURE_FORMAT,
             furi_string_get_cstr(dir_path),
             i,
-            NFC_APP_EXTENSION);
+            NFC_APP_FILENAME_EXTENSION);
         bool exit_cond =
             storage_common_stat(inst->storage, furi_string_get_cstr(file_path), NULL) ==
             FSE_NOT_EXIST;

+ 1 - 1
non_catalog_apps/flipperzero_vb_migrate/vb_migrate_i.h

@@ -42,7 +42,7 @@
 
 #include "vb_migrate_icons.h"
 
-#define VB_MIGRATE_TEMPLATE_NAME "template" NFC_APP_EXTENSION
+#define VB_MIGRATE_TEMPLATE_NAME "template" NFC_APP_FILENAME_EXTENSION
 #define VB_MIGRATE_CAPTURE_FORMAT "%03d%s"
 
 #define VB_MIGRATE_MAX_DEV_NAME_LENGTH (30)