mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
chore: try to fix service not started on linux
This commit is contained in:
@@ -47,11 +47,9 @@ pub fn app_home_dir() -> Result<PathBuf> {
|
||||
let app_handle = handle::Handle::global().app_handle().unwrap();
|
||||
|
||||
match app_handle.path().data_dir() {
|
||||
Ok(dir) => {
|
||||
Ok(dir.join(APP_ID))
|
||||
}
|
||||
Ok(dir) => Ok(dir.join(APP_ID)),
|
||||
Err(e) => {
|
||||
log::error!("Failed to get the app home directory: {}", e);
|
||||
log::error!(target:"app", "Failed to get the app home directory: {}", e);
|
||||
Err(anyhow::anyhow!("Failed to get the app homedirectory"))
|
||||
}
|
||||
}
|
||||
@@ -61,11 +59,9 @@ pub fn app_home_dir() -> Result<PathBuf> {
|
||||
pub fn app_resources_dir() -> Result<PathBuf> {
|
||||
let app_handle = handle::Handle::global().app_handle().unwrap();
|
||||
match app_handle.path().resource_dir() {
|
||||
Ok(dir) => {
|
||||
Ok(dir.join("resources"))
|
||||
}
|
||||
Ok(dir) => Ok(dir.join("resources")),
|
||||
Err(e) => {
|
||||
log::error!("Failed to get the resource directory: {}", e);
|
||||
log::error!(target:"app", "Failed to get the resource directory: {}", e);
|
||||
Err(anyhow::anyhow!("Failed to get the resource directory"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user