[FL-3001] File browser base folder (#2091)

* File browser base folder
* Format sources
* FuriHal: bump api version

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov
2022-12-07 17:17:41 +03:00
committed by GitHub
parent 741ad34b2c
commit 2daf39018b
22 changed files with 38 additions and 9 deletions

View File

@@ -371,6 +371,7 @@ static int32_t browser_worker(void* context) {
BrowserWorker* file_browser_worker_alloc(
FuriString* path,
const char* base_path,
const char* filter_ext,
bool skip_assets,
bool hide_dot_files) {
@@ -381,12 +382,13 @@ BrowserWorker* file_browser_worker_alloc(
browser->filter_extension = furi_string_alloc_set(filter_ext);
browser->skip_assets = skip_assets;
browser->hide_dot_files = hide_dot_files;
browser->path_start = furi_string_alloc_set(path);
browser->path_current = furi_string_alloc_set(path);
browser->path_next = furi_string_alloc_set(path);
if(browser_path_is_file(browser->path_start)) {
browser_path_trim(browser->path_start);
browser->path_start = furi_string_alloc();
if(base_path) {
furi_string_set_str(browser->path_start, base_path);
}
browser->thread = furi_thread_alloc_ex("BrowserWorker", 2048, browser_worker, browser);