properly trunk global config
This commit is contained in:
parent
617ade0163
commit
47436f42b0
@ -45,9 +45,13 @@ namespace EliteBGS.Util {
|
|||||||
|
|
||||||
public void SaveGlobal() {
|
public void SaveGlobal() {
|
||||||
var serializer = JsonSerializer.CreateDefault();
|
var serializer = JsonSerializer.CreateDefault();
|
||||||
using (var file = new StreamWriter(File.OpenWrite(config_file), Encoding.UTF8)) {
|
using (FileStream filestream = File.OpenWrite(config_file)) {
|
||||||
var stream = new JsonTextWriter(file);
|
filestream.SetLength(0);
|
||||||
serializer.Serialize(stream, global_config);
|
filestream.Flush();
|
||||||
|
using (StreamWriter file = new StreamWriter(filestream, Encoding.UTF8)) {
|
||||||
|
var stream = new JsonTextWriter(file);
|
||||||
|
serializer.Serialize(stream, global_config);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user