From 5d6e105d03cef52fd16b99e6cd8c5f77e3302a0d Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:30:58 +0300 Subject: [PATCH] possible fix for issue with subrem maps [ci skip] subremote maps being unknown in favourites in rare cases --- applications/main/archive/helpers/archive_files.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/applications/main/archive/helpers/archive_files.c b/applications/main/archive/helpers/archive_files.c index e8331e24d..67d636581 100644 --- a/applications/main/archive/helpers/archive_files.c +++ b/applications/main/archive/helpers/archive_files.c @@ -16,16 +16,15 @@ void archive_set_file_type(ArchiveFile_t* file, const char* path, bool is_folder for(size_t i = 0; i < COUNT_OF(known_ext); i++) { if((known_ext[i][0] == '?') || (known_ext[i][0] == '*')) continue; if(furi_string_end_with(file->path, known_ext[i])) { - if(i == ArchiveFileTypeBadUsb) { + if((i == ArchiveFileTypeBadUsb) || (i == ArchiveFileTypeSubGhzRemote)) { if(furi_string_search( file->path, archive_get_default_path(ArchiveTabBadUsb)) == 0) { - file->type = i; + file->type = ArchiveFileTypeBadUsb; return; // *.txt file is a BadUSB script only if it is in BadUSB folder } - } else if(i == ArchiveFileTypeSubGhzRemote) { if(furi_string_search( file->path, archive_get_default_path(ArchiveTabSubGhzRemote)) == 0) { - file->type = i; + file->type = ArchiveFileTypeSubGhzRemote; return; // *.txt file is a SubRem map file only if it is in SubRem folder } } else {