From 69cea6c980e38c7634290758a5012110761c07cd Mon Sep 17 00:00:00 2001 From: E44 <129310925+programmer-44@users.noreply.github.com> Date: Sat, 8 Nov 2025 22:41:09 +0100 Subject: [PATCH] handle cd directory errors --- control/frontend/src/ts/api_handler.ts | 30 ++++++++++++++++++++----- control/frontend/src/ts/stores/files.ts | 2 +- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/control/frontend/src/ts/api_handler.ts b/control/frontend/src/ts/api_handler.ts index 956faa1..45f514b 100644 --- a/control/frontend/src/ts/api_handler.ts +++ b/control/frontend/src/ts/api_handler.ts @@ -20,7 +20,6 @@ export async function send_keyboard_input(ip: string, key: string): Promise { const current_folder = await get_file_tree_data(display.ip, file_path); - if (current_folder === null) return null; + if (current_folder === null) return [file_path]; const directory_strings = get_recursive_changed_directory_paths(display, file_path, current_folder, get(all_files)); if (directory_strings.size === 0) return null; const directory_strings_array = [...directory_strings];