From 0daa23ed8f8fdc61a63972a3e566089994ce3114 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Fri, 21 Aug 2026 15:17:33 +0800 Subject: [PATCH] fix(desktop): validate app-open links on secondary launch --- src-tauri/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 9c3d11707c..1d9311f0b0 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1290,6 +1290,7 @@ pub fn run() { let builder = if should_enable_single_instance(cfg!(debug_assertions)) { builder.plugin(tauri_plugin_single_instance::init(|app, args, cwd| { + let app_open_requested = args.iter().any(|arg| commands::deep_link::is_app_open_deep_link(arg)); let links = commands::deep_link::connection_deep_links_from_args(args.clone()); open_connection_deep_links(app, links); @@ -1314,7 +1315,7 @@ pub fn run() { // simply vanished - so make the reason recoverable from the logs. if !show_main_window(app) { eprintln!( - "[WINDOW] single-instance handoff could not reveal the main window; {}", + "[WINDOW] single-instance handoff could not reveal the main window; app_open_requested={app_open_requested}; {}", main_window_probe_state(app) ); }