mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 06:20:21 +00:00
possible fix for issue with subrem maps [ci skip]
subremote maps being unknown in favourites in rare cases
This commit is contained in:
parent
b718a2eba1
commit
5d6e105d03
1 changed files with 3 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue