mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 03:37:10 +08:00
Merge pull request #230 from allanpk716/patch-1
FIx FileNotFoundException in GetIcon
This commit is contained in:
commit
3143d0d8aa
@ -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 New Issue
Block a user