From 5b9e078061d7777d19996a4019da33898836bfb4 Mon Sep 17 00:00:00 2001 From: GyDi Date: Fri, 1 Apr 2022 23:43:35 +0800 Subject: [PATCH] chore: add debug feature --- src-tauri/Cargo.toml | 1 + src-tauri/src/utils/dirs.rs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 9684316..6467b00 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -42,6 +42,7 @@ winreg = { version = "0.10", features = ["transactions"] } default = [ "custom-protocol" ] custom-protocol = [ "tauri/custom-protocol" ] verge-dev = [] +debug-yml = [] [profile.release] panic = "abort" diff --git a/src-tauri/src/utils/dirs.rs b/src-tauri/src/utils/dirs.rs index e905f30..bd3058e 100644 --- a/src-tauri/src/utils/dirs.rs +++ b/src-tauri/src/utils/dirs.rs @@ -53,5 +53,9 @@ pub fn profiles_path() -> PathBuf { } pub fn profiles_temp_path() -> PathBuf { - temp_dir().join(PROFILE_TEMP) + #[cfg(not(feature = "debug-yml"))] + return temp_dir().join(PROFILE_TEMP); + + #[cfg(feature = "debug-yml")] + return app_home_dir().join(PROFILE_TEMP); }