GPT claims that this is a race condition, which will cause failure to save (the temp file handle is not yet disposed before deleting it).
|
public async Task SaveAsync() |
|
{ |
|
// User may delete the directory, so we need to check it |
|
FilesFolders.ValidateDirectory(DirectoryPath); |
|
|
|
await using var tempOutput = File.OpenWrite(TempFilePath); |
|
await JsonSerializer.SerializeAsync(tempOutput, Data, |
|
new JsonSerializerOptions { WriteIndented = true }); |
|
AtomicWriteSetting(); |
|
} |
GPT claims that this is a race condition, which will cause failure to save (the temp file handle is not yet disposed before deleting it).
Flow.Launcher/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs
Lines 215 to 224 in d0d41c6