Merge pull request #15 from ncblakely/users/tos/configwrite

Ensure config file is overwritten when saved.
This commit is contained in:
ncblakely 2022-09-10 23:02:00 -07:00 committed by GitHub
commit 4e81ab7521
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -49,8 +49,7 @@
Directory.CreateDirectory(Path.GetDirectoryName(userConfigFilePath));
using (var file = File.OpenWrite(userConfigFilePath))
using (var streamWriter = new StreamWriter(file))
using (var streamWriter = new StreamWriter(userConfigFilePath, append: false))
{
string serializedConfig = JsonConvert.SerializeObject(this.userConfig, Formatting.Indented);
streamWriter.Write(serializedConfig);