mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
修复 GetIcon 可能出现的 FileNotFoundException 异常
重启电脑的时候会提示 FileNotFoundException ,所以在这里加一个检查。
This commit is contained in:
parent
31281c7faa
commit
0bb1669efa
1 changed files with 5 additions and 0 deletions
|
|
@ -38,6 +38,11 @@ namespace Wox.ImageLoader
|
|||
|
||||
private static ImageSource GetIcon(string fileName)
|
||||
{
|
||||
if (System.IO.File.Exists(fileName) == false)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Icon icon = GetFileIcon(fileName);
|
||||
if (icon == null) icon = Icon.ExtractAssociatedIcon(fileName);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue