Просмотр исходного кода

Update nfc_playlist_scene_name_new_file.c

- Fixes the issue causing the app to freeze after creating a playlist with no playlist already selected
acegoal07 1 год назад
Родитель
Сommit
d9cb04ba55
1 измененных файлов с 6 добавлено и 8 удалено
  1. 6 8
      scenes/nfc_playlist_scene_name_new_file.c

+ 6 - 8
scenes/nfc_playlist_scene_name_new_file.c

@@ -7,15 +7,13 @@ void nfc_playlist_name_new_file_menu_callback(void* context) {
 
    furi_string_printf(file_name, "/ext/apps_data/nfc_playlist/%s.txt", nfc_playlist->text_input_output);
 
-   if (!storage_common_exists(storage, furi_string_get_cstr(file_name))) {
-      File* file = storage_file_alloc(storage);
-      if (storage_file_open(file, furi_string_get_cstr(file_name), FSAM_READ_WRITE, FSOM_CREATE_NEW)) {
-         storage_file_close(file);
-         furi_string_swap(nfc_playlist->settings.file_path, file_name);
-      }
-      storage_file_free(file);
+   File* file = storage_file_alloc(storage);
+   if (storage_file_open(file, furi_string_get_cstr(file_name), FSAM_READ_WRITE, FSOM_CREATE_NEW)) {
+      storage_file_close(file);
+      furi_string_swap(nfc_playlist->settings.file_path, file_name);
    }
-
+   
+   storage_file_free(file);
    furi_string_free(file_name);
    furi_record_close(RECORD_STORAGE);
    scene_manager_previous_scene(nfc_playlist->scene_manager);