From b58e7ab8e39a78638b2baefbfa5a0d00651b522b Mon Sep 17 00:00:00 2001 From: RebornedBrain <138568282+RebornedBrain@users.noreply.github.com> Date: Fri, 13 Oct 2023 17:11:35 +0300 Subject: [PATCH] NFC: Proper nfc files deleting (#3148) * Fixed proper .shd and .nfc file removing --- applications/main/nfc/nfc_app.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/applications/main/nfc/nfc_app.c b/applications/main/nfc/nfc_app.c index 77d67d984e9..fe680aa32df 100644 --- a/applications/main/nfc/nfc_app.c +++ b/applications/main/nfc/nfc_app.c @@ -370,6 +370,11 @@ bool nfc_delete(NfcApp* instance) { nfc_delete_shadow_file(instance); } + if(furi_string_end_with_str(instance->file_path, NFC_APP_SHADOW_EXTENSION)) { + size_t path_len = furi_string_size(instance->file_path); + furi_string_replace_at(instance->file_path, path_len - 4, 4, NFC_APP_EXTENSION); + } + return storage_simply_remove(instance->storage, furi_string_get_cstr(instance->file_path)); }