get language despite admin or not

This commit is contained in:
SpikeHD
2022-06-01 17:40:24 -07:00
parent 174a990c40
commit ecd4bff882
2 changed files with 15 additions and 2 deletions

View File

@@ -54,3 +54,14 @@ pub fn open_in_browser(url: String) {
Err(e) => println!("Failed to open URL: {}", e),
};
}
pub fn install_location() -> String {
let mut exe_path = std::env::current_exe().unwrap();
// Get the path to the executable.
exe_path.pop();
println!("{}", exe_path.to_str().unwrap().to_string());
return exe_path.to_str().unwrap().to_string();
}