mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-18 16:29:41 +02:00
Use await using
in LocalizationService
This commit is contained in:
parent
abddce1cfa
commit
401edeabba
@ -146,21 +146,12 @@ private async Task CopyInto(IDictionary<string, string> dictionary, string resou
|
||||
return;
|
||||
}
|
||||
|
||||
using (var fs = File.OpenRead(resourcePath))
|
||||
{
|
||||
if (fs != null)
|
||||
{
|
||||
var dict = await JsonSerializer.DeserializeAsync<Dictionary<string, string>>(fs);
|
||||
await using var fs = File.OpenRead(resourcePath);
|
||||
var dict = await JsonSerializer.DeserializeAsync<Dictionary<string, string>>(fs);
|
||||
|
||||
foreach (var key in dict.Keys)
|
||||
{
|
||||
dictionary[key] = dict[key];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.Error("Missing translation/culture resource: {0}", resourcePath);
|
||||
}
|
||||
foreach (var key in dict.Keys)
|
||||
{
|
||||
dictionary[key] = dict[key];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user