Archive browser: update path on dir leave (#2455)

This commit is contained in:
Nikolay Minaylov 2023-03-03 21:07:41 +03:00 committed by GitHub
parent 0b7d205253
commit 5d4057f722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -510,12 +510,16 @@ void archive_enter_dir(ArchiveBrowserView* browser, FuriString* path) {
browser->view, ArchiveBrowserViewModel * model, { idx_temp = model->item_idx; }, false);
furi_string_set(browser->path, path);
file_browser_worker_folder_enter(browser->worker, path, idx_temp);
}
void archive_leave_dir(ArchiveBrowserView* browser) {
furi_assert(browser);
size_t dirname_start = furi_string_search_rchar(browser->path, '/');
furi_string_left(browser->path, dirname_start);
file_browser_worker_folder_exit(browser->worker);
}