From c811c5818d21a67280ef9dd35ad40f6f5411daa5 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 21 Mar 2026 16:37:51 +0800 Subject: Good Bye! Legacy JVCS --- legacy_data/src/data/local/modified_status.rs | 30 --------------------------- 1 file changed, 30 deletions(-) delete mode 100644 legacy_data/src/data/local/modified_status.rs (limited to 'legacy_data/src/data/local/modified_status.rs') diff --git a/legacy_data/src/data/local/modified_status.rs b/legacy_data/src/data/local/modified_status.rs deleted file mode 100644 index e0e6dd5..0000000 --- a/legacy_data/src/data/local/modified_status.rs +++ /dev/null @@ -1,30 +0,0 @@ -use crate::{constants::CLIENT_FILE_VAULT_MODIFIED, env::current_local_path}; - -pub async fn check_vault_modified() -> bool { - let Some(current_dir) = current_local_path() else { - return false; - }; - - let record_file = current_dir.join(CLIENT_FILE_VAULT_MODIFIED); - if !record_file.exists() { - return false; - } - - let Ok(contents) = tokio::fs::read_to_string(&record_file).await else { - return false; - }; - - matches!(contents.trim().to_lowercase().as_str(), "true") -} - -pub async fn sign_vault_modified(modified: bool) { - let Some(current_dir) = current_local_path() else { - return; - }; - - let record_file = current_dir.join(CLIENT_FILE_VAULT_MODIFIED); - - let contents = if modified { "true" } else { "false" }; - - let _ = tokio::fs::write(&record_file, contents).await; -} -- cgit