From 5b7f872c60a2cc7fe30754189770e24ada7a0d39 Mon Sep 17 00:00:00 2001 From: E44 <129310925+programmer-44@users.noreply.github.com> Date: Sun, 23 Nov 2025 12:48:48 +0100 Subject: [PATCH] fix(control): remove second delete request --- control/frontend/src/ts/api_handler.ts | 1 - control/frontend/src/ts/stores/files.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/control/frontend/src/ts/api_handler.ts b/control/frontend/src/ts/api_handler.ts index 89a9fc7..a8c9131 100644 --- a/control/frontend/src/ts/api_handler.ts +++ b/control/frontend/src/ts/api_handler.ts @@ -117,7 +117,6 @@ export async function delete_files(ip: string, current_path: string, file_names: for (const file_name of file_names) { command += ` && rm -r "${file_name}"`; } - await run_shell_command(ip, command); const raw_response = await run_shell_command(ip, command); if (!raw_response.ok || !raw_response.json) return; const json_response = raw_response.json as ShellCommandResponse; diff --git a/control/frontend/src/ts/stores/files.ts b/control/frontend/src/ts/stores/files.ts index a65e5db..432066d 100644 --- a/control/frontend/src/ts/stores/files.ts +++ b/control/frontend/src/ts/stores/files.ts @@ -290,7 +290,7 @@ export async function run_for_selected_files_on_selected_displays(action: (ip: s if (selected_file_names_on_display.length === 0) continue; const display = get_display_by_id(display_id, get(displays)); - if (!display) continue + if (!display) continue; await action(display.ip, selected_file_names_on_display); }