Code quality

This commit is contained in:
Jack251970 2025-05-01 13:33:24 +08:00
parent 0673d07c2a
commit 4ecef470e8

View file

@ -52,17 +52,12 @@ namespace Flow.Launcher.Infrastructure.Storage
public void Delete() public void Delete()
{ {
if (File.Exists(FilePath)) foreach (var path in new[] { FilePath, BackupFilePath, TempFilePath })
{ {
File.Delete(FilePath); if (File.Exists(path))
} {
if (File.Exists(BackupFilePath)) File.Delete(path);
{ }
File.Delete(BackupFilePath);
}
if (File.Exists(TempFilePath))
{
File.Delete(TempFilePath);
} }
} }