don't std::process::exit

This commit is contained in:
2025-04-08 09:02:16 +01:00
parent 807cb5242f
commit 99b6519ffb
2 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ use windows::{
core::{HSTRING, PCWSTR},
};
pub fn elevate() {
pub fn elevate(closing: &mut bool) {
let exe = std::env::current_exe().unwrap();
unsafe {
ShellExecuteW(
@@ -18,7 +18,7 @@ pub fn elevate() {
SW_HIDE,
);
}
std::process::exit(0);
*closing = true;
}
pub fn is_elevated() -> bool {