mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
fix: prevent save yaml return too early to failed get runtime config
This commit is contained in:
@@ -75,7 +75,9 @@ pub async fn save_yaml<T: Serialize + Sync>(
|
||||
let path_str = path.as_os_str().to_string_lossy().to_string();
|
||||
tokio::fs::write(path, yaml_str.as_bytes())
|
||||
.await
|
||||
.with_context(|| format!("failed to save file \"{path_str}\""))
|
||||
.with_context(|| format!("failed to save file \"{path_str}\""))?;
|
||||
tokio::time::sleep(std::time::Duration::from_millis(50)).await;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
const ALPHABET: [char; 62] = [
|
||||
|
||||
Reference in New Issue
Block a user