Skip to content

Commit 4b38e0e

Browse files
committed
properly dispose the filestream
1 parent a62b222 commit 4b38e0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Flow.Launcher.Infrastructure/Storage/JsonStorage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public void Save()
190190

191191
public async Task SaveAsync()
192192
{
193-
var tempOutput = File.OpenWrite(TempFilePath);
193+
await using var tempOutput = File.OpenWrite(TempFilePath);
194194
await JsonSerializer.SerializeAsync(tempOutput, Data,
195195
new JsonSerializerOptions { WriteIndented = true });
196196
AtomicWriteSetting();

0 commit comments

Comments
 (0)