Optimize save config files

This commit is contained in:
2dust
2024-12-07 14:07:51 +08:00
parent dbd4f55981
commit 83ad83b135
4 changed files with 35 additions and 70 deletions
@@ -409,7 +409,9 @@ namespace ServiceLib.Services.CoreConfig
{
await GenInbounds(singboxConfig);
await GenExperimental(singboxConfig);
JsonUtils.ToFile(singboxConfig, fileName, false);
var content = JsonUtils.Serialize(singboxConfig, true);
await File.WriteAllTextAsync(fileName, content);
}
}
else