chore: Change service path

This commit is contained in:
MystiPanda
2023-12-13 10:59:07 +08:00
parent 16fa2c9f5e
commit eadd1042fb
2 changed files with 14 additions and 14 deletions

View File

@@ -115,22 +115,12 @@ pub fn app_res_dir() -> Result<PathBuf> {
}
pub fn clash_pid_path() -> Result<PathBuf> {
unsafe {
Ok(RESOURCE_DIR
.clone()
.ok_or(anyhow::anyhow!("failed to get the resource dir"))?
.join("clash.pid"))
}
Ok(app_home_dir()?.join("clash.pid"))
}
#[cfg(windows)]
pub fn service_path() -> Result<PathBuf> {
unsafe {
let res_dir = RESOURCE_DIR
.clone()
.ok_or(anyhow::anyhow!("failed to get the resource dir"))?;
Ok(res_dir.join("clash-verge-service.exe"))
}
Ok(app_home_dir()?.join("clash-verge-service.exe"))
}
#[cfg(windows)]