fix crash on denying UAC prompt

This commit is contained in:
SpikeHD 2022-07-13 18:26:06 -07:00
parent 4fc90ee333
commit b2453e7c4d

View File

@ -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(());
});
}