mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
fix crash on denying UAC prompt
This commit is contained in:
@@ -4,7 +4,8 @@ use duct::cmd;
|
|||||||
pub fn run_program(path: String) {
|
pub fn run_program(path: String) {
|
||||||
// Open in new thread to prevent blocking.
|
// Open in new thread to prevent blocking.
|
||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
open::that(&path).unwrap();
|
// Without unwrap_or, this can crash when UAC prompt is denied
|
||||||
|
open::that(&path).unwrap_or(());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user