Skip to content

Commit 4ecef47

Browse files
committed
Code quality
1 parent 0673d07 commit 4ecef47

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

Flow.Launcher.Infrastructure/Storage/JsonStorage.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,12 @@ public bool Exists()
5252

5353
public void Delete()
5454
{
55-
if (File.Exists(FilePath))
56-
{
57-
File.Delete(FilePath);
58-
}
59-
if (File.Exists(BackupFilePath))
55+
foreach (var path in new[] { FilePath, BackupFilePath, TempFilePath })
6056
{
61-
File.Delete(BackupFilePath);
62-
}
63-
if (File.Exists(TempFilePath))
64-
{
65-
File.Delete(TempFilePath);
57+
if (File.Exists(path))
58+
{
59+
File.Delete(path);
60+
}
6661
}
6762
}
6863

0 commit comments

Comments
 (0)