From b2453e7c4d371517b6b5b07a7f40ef0d559c0473 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Wed, 13 Jul 2022 18:26:06 -0700 Subject: [PATCH] fix crash on denying UAC prompt --- src-tauri/src/system_helpers.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/system_helpers.rs b/src-tauri/src/system_helpers.rs index 2eb3f39..dad2b68 100644 --- a/src-tauri/src/system_helpers.rs +++ b/src-tauri/src/system_helpers.rs @@ -4,7 +4,8 @@ use duct::cmd; pub fn run_program(path: String) { // Open in new thread to prevent blocking. std::thread::spawn(move || { - open::that(&path).unwrap(); + // Without unwrap_or, this can crash when UAC prompt is denied + open::that(&path).unwrap_or(()); }); }