We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01d30dd commit b24b4c7Copy full SHA for b24b4c7
Mikoto/Helpers/Graphics/ImageHelper.cs
@@ -57,14 +57,14 @@ public static Image GetGameIcon(string path)
57
58
private static string[] GetFilteredIcoPath(string path)
59
{
60
- try
+ var dir = Path.GetDirectoryName(path);
61
+ if (Directory.Exists(dir))
62
- return Directory.GetFiles(Path.GetDirectoryName(path)!, "*.ico").Where(p => !p.Contains("uninst")).ToArray();
63
-
+ return Directory.GetFiles(dir, "*.ico").Where(p => !p.Contains("uninst")).ToArray();
64
}
65
- catch (DirectoryNotFoundException)
+ else
66
67
- return Array.Empty<string>();
+ return [];
68
69
70
0 commit comments