mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add using for File.OpenRead
This commit is contained in:
parent
48971d8a2b
commit
238d4df109
1 changed files with 4 additions and 1 deletions
|
|
@ -328,7 +328,10 @@ namespace Flow.Launcher.Core.Plugin
|
|||
return;
|
||||
|
||||
if (File.Exists(SettingPath))
|
||||
Settings = await JsonSerializer.DeserializeAsync<Dictionary<string, object>>(File.OpenRead(SettingPath), options);
|
||||
{
|
||||
await using var fileStream = File.OpenRead(SettingPath);
|
||||
Settings = await JsonSerializer.DeserializeAsync<Dictionary<string, object>>(fileStream, options);
|
||||
}
|
||||
|
||||
var deserializer = new DeserializerBuilder().WithNamingConvention(CamelCaseNamingConvention.Instance).Build();
|
||||
_settingsTemplate = deserializer.Deserialize<JsonRpcConfigurationModel>(await File.ReadAllTextAsync(SettingConfigurationPath));
|
||||
|
|
|
|||
Loading…
Reference in a new issue