possible fix for issue with subrem maps [ci skip]

subremote maps being unknown in favourites in rare cases
This commit is contained in:
MX 2024-06-14 18:30:58 +03:00
parent b718a2eba1
commit 5d6e105d03
No known key found for this signature in database
GPG Key ID: 7CCC66B7DBDD1C83

View File

@ -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 {