From 51ddf6a71544acfb261ffc9393dab1342da0a219 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 9 Oct 2024 14:47:25 +0300 Subject: [PATCH] fix(shell): use async command for `open` JS API (#1881) closes tauri-apps/tauri#11212 --- .changes/shell-open-hang-windows.md | 6 ++++++ plugins/shell/src/commands.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/shell-open-hang-windows.md diff --git a/.changes/shell-open-hang-windows.md b/.changes/shell-open-hang-windows.md new file mode 100644 index 00000000..e9c22c68 --- /dev/null +++ b/.changes/shell-open-hang-windows.md @@ -0,0 +1,6 @@ +--- +"shell": "patch" +"shell-js": "patch" +--- + +On Windows, Fix `open` JS API hanging and freezing the app. \ No newline at end of file diff --git a/plugins/shell/src/commands.rs b/plugins/shell/src/commands.rs index 7aac7b6c..3345bb3a 100644 --- a/plugins/shell/src/commands.rs +++ b/plugins/shell/src/commands.rs @@ -303,7 +303,7 @@ pub fn kill( } #[tauri::command] -pub fn open( +pub async fn open( _window: Window, shell: State<'_, Shell>, path: String,