refactor: done

This commit is contained in:
GyDi
2022-11-18 18:18:41 +08:00
parent ce2d4498e1
commit bedd3abf8a
24 changed files with 343 additions and 341 deletions

View File

@@ -1,5 +1,5 @@
use anyhow::Result;
use std::{env::temp_dir, path::PathBuf};
use std::path::PathBuf;
use tauri::{
api::path::{home_dir, resource_dir},
Env, PackageInfo,
@@ -107,14 +107,6 @@ pub fn profiles_path() -> Result<PathBuf> {
Ok(app_home_dir()?.join(PROFILE_YAML))
}
pub fn clash_runtime_yaml() -> Result<PathBuf> {
Ok(app_home_dir()?.join("clash-verge-runtime.yaml"))
}
pub fn clash_check_yaml() -> Result<PathBuf> {
Ok(temp_dir().join("clash-verge-check.yaml"))
}
pub fn app_res_dir() -> Result<PathBuf> {
unsafe {
Ok(RESOURCE_DIR