diff --git a/applications/main/archive/helpers/archive_files.c b/applications/main/archive/helpers/archive_files.c index 6e654d5a2..08d2c5ac8 100644 --- a/applications/main/archive/helpers/archive_files.c +++ b/applications/main/archive/helpers/archive_files.c @@ -15,7 +15,7 @@ void archive_set_file_type(ArchiveFile_t* file, const char* path, bool is_folder } else { for(size_t i = 0; i < COUNT_OF(known_ext); i++) { if((known_ext[i][0] == '?') || (known_ext[i][0] == '*')) continue; - if(furi_string_search(file->path, known_ext[i], 0) != FURI_STRING_FAILURE) { + if(furi_string_end_with(file->path, known_ext[i])) { if(i == ArchiveFileTypeBadUsb) { if(furi_string_search( file->path, archive_get_default_path(ArchiveTabBadUsb)) == 0) { diff --git a/applications/services/gui/modules/file_browser_worker.c b/applications/services/gui/modules/file_browser_worker.c index b0bb456b1..c33288765 100644 --- a/applications/services/gui/modules/file_browser_worker.c +++ b/applications/services/gui/modules/file_browser_worker.c @@ -80,6 +80,7 @@ static bool browser_path_trim(FuriString* path) { return is_root; } static void browser_parse_ext_filter(ExtFilterArray_t ext_filter, const char* filter_str) { + ExtFilterArray_reset(ext_filter); if(!filter_str) { return; } diff --git a/applications/system/js_app/js_thread.c b/applications/system/js_app/js_thread.c index 22007d013..5ca365404 100644 --- a/applications/system/js_app/js_thread.c +++ b/applications/system/js_app/js_thread.c @@ -210,6 +210,7 @@ static void js_global_to_hex_string(struct mjs* mjs) { mjs_return(mjs, ret); } +#ifdef JS_DEBUG static void js_dump_write_callback(void* ctx, const char* format, ...) { File* file = ctx; furi_assert(ctx); @@ -225,6 +226,7 @@ static void js_dump_write_callback(void* ctx, const char* format, ...) { storage_file_write(file, furi_string_get_cstr(str), furi_string_size(str)); furi_string_free(str); } +#endif static int32_t js_thread(void* arg) { JsThread* worker = arg; @@ -255,6 +257,7 @@ static int32_t js_thread(void* arg) { mjs_err_t err = mjs_exec_file(mjs, furi_string_get_cstr(worker->path), NULL); +#ifdef JS_DEBUG if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) { FuriString* dump_path = furi_string_alloc_set(worker->path); furi_string_cat(dump_path, ".lst"); @@ -273,6 +276,7 @@ static int32_t js_thread(void* arg) { furi_string_free(dump_path); } +#endif if(err != MJS_OK) { FURI_LOG_E(TAG, "Exec error: %s", mjs_strerror(mjs, err));