This commit is contained in:
VerstreuteSeele
2022-12-19 21:52:58 +01:00
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ Nfc* nfc_alloc() {
// Nfc device
nfc->dev = nfc_device_alloc();
furi_string_set(nfc->dev->folder, NFC_APP_FOLDER);
// Open GUI record
nfc->gui = furi_record_open(RECORD_GUI);
+1 -1
View File
@@ -50,7 +50,7 @@ NfcMagic* nfc_magic_alloc() {
// Nfc device
nfc_magic->nfc_dev = nfc_device_alloc();
furi_string_set(nfc_magic->nfc_dev->folder, NFC_APP_FOLDER);
// Open GUI record
nfc_magic->gui = furi_record_open(RECORD_GUI);
view_dispatcher_attach_to_gui(
+6 -2
View File
@@ -1362,7 +1362,7 @@ bool nfc_device_save(NfcDevice* dev, const char* dev_name) {
break;
}
furi_string_free(folder);
// First remove nfc device file if it was saved
// Open file
if(!flipper_format_file_open_always(file, furi_string_get_cstr(temp_str))) break;
// Write header
@@ -1611,7 +1611,11 @@ bool nfc_device_delete(NfcDevice* dev, bool use_load_path) {
furi_string_set(file_path, dev->load_path);
} else {
furi_string_printf(
file_path, "%s/%s%s", NFC_APP_FOLDER, dev->dev_name, NFC_APP_EXTENSION);
file_path,
"%s/%s%s",
furi_string_get_cstr(dev->folder),
dev->dev_name,
NFC_APP_EXTENSION);
}
if(!storage_simply_remove(dev->storage, furi_string_get_cstr(file_path))) break;
// Delete shadow file if it exists