mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-27 15:22:29 +03: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
@ -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 New Issue
Block a user