From 95d02923de40a4e215d67a4432f1d5e24b6f33aa Mon Sep 17 00:00:00 2001 From: gornekich Date: Tue, 6 Dec 2022 13:16:01 +0400 Subject: [PATCH] nfc: rename cache folder to .cache --- lib/nfc/nfc_device.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/nfc/nfc_device.c b/lib/nfc/nfc_device.c index dc1faa34c..9c706c6ec 100644 --- a/lib/nfc/nfc_device.c +++ b/lib/nfc/nfc_device.c @@ -8,7 +8,7 @@ #include #define TAG "NfcDevice" -#define NFC_DEVICE_KEYS_FOLDER EXT_PATH("nfc/cache") +#define NFC_DEVICE_KEYS_FOLDER EXT_PATH("nfc/.cache") #define NFC_DEVICE_KEYS_EXTENSION ".keys" static const char* nfc_file_header = "Flipper NFC device"; @@ -27,6 +27,11 @@ NfcDevice* nfc_device_alloc() { nfc_dev->dialogs = furi_record_open(RECORD_DIALOGS); nfc_dev->load_path = furi_string_alloc(); nfc_dev->dev_data.parsed_data = furi_string_alloc(); + + // Rename cache folder name for backward compatibility + if(storage_common_stat(nfc_dev->storage, "/ext/nfc/cache", NULL) == FSE_OK) { + storage_common_rename(nfc_dev->storage, "/ext/nfc/cache", NFC_DEVICE_KEYS_FOLDER); + } return nfc_dev; }