mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-18 16:30:32 +08:00
fix: prevent save yaml return too early to failed get runtime config
This commit is contained in:
parent
c4e558d377
commit
f6f288f02b
@ -75,7 +75,9 @@ pub async fn save_yaml<T: Serialize + Sync>(
|
|||||||
let path_str = path.as_os_str().to_string_lossy().to_string();
|
let path_str = path.as_os_str().to_string_lossy().to_string();
|
||||||
tokio::fs::write(path, yaml_str.as_bytes())
|
tokio::fs::write(path, yaml_str.as_bytes())
|
||||||
.await
|
.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] = [
|
const ALPHABET: [char; 62] = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user