mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-29 16:49:10 +08:00
fix reinstall
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
4f8dd59c7c
commit
896da1b153
@ -129,7 +129,7 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
{
|
||||
use crate::platform;
|
||||
if args[0] == "--uninstall" {
|
||||
if let Err(err) = platform::uninstall_me() {
|
||||
if let Err(err) = platform::uninstall_me(true) {
|
||||
log::error!("Failed to uninstall: {}", err);
|
||||
}
|
||||
return None;
|
||||
@ -147,7 +147,7 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
hbb_common::allow_err!(platform::update_me());
|
||||
return None;
|
||||
} else if args[0] == "--reinstall" {
|
||||
hbb_common::allow_err!(platform::uninstall_me());
|
||||
hbb_common::allow_err!(platform::uninstall_me(false));
|
||||
hbb_common::allow_err!(platform::install_me(
|
||||
"desktopicon startmenu",
|
||||
"".to_owned(),
|
||||
|
@ -1235,8 +1235,8 @@ fn get_uninstall(kill_self: bool) -> String {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn uninstall_me() -> ResultType<()> {
|
||||
run_cmds(get_uninstall(true), true, "uninstall")
|
||||
pub fn uninstall_me(kill_self: bool) -> ResultType<()> {
|
||||
run_cmds(get_uninstall(kill_self), true, "uninstall")
|
||||
}
|
||||
|
||||
fn write_cmds(cmds: String, ext: &str, tip: &str) -> ResultType<std::path::PathBuf> {
|
||||
|
Loading…
Reference in New Issue
Block a user