fix configuration write append issue

This commit is contained in:
RaidMax 2023-08-23 16:34:07 -05:00
parent e472468c02
commit 08edbf9bd4

View File

@ -129,7 +129,7 @@ public class BaseConfigurationHandlerV2<TConfigurationType> : IConfigurationHand
await _onIo.WaitAsync(); await _onIo.WaitAsync();
} }
await using var fileStream = File.OpenWrite(_path); await using var fileStream = File.Create(_path);
await JsonSerializer.SerializeAsync(fileStream, configuration, _serializerOptions); await JsonSerializer.SerializeAsync(fileStream, configuration, _serializerOptions);
await fileStream.DisposeAsync(); await fileStream.DisposeAsync();
_configurationInstance = configuration; _configurationInstance = configuration;