mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix can't find file exception caused by abnormal scale
This commit is contained in:
parent
19617e9dae
commit
69c00d272b
1 changed files with 15 additions and 3 deletions
|
|
@ -235,9 +235,21 @@ namespace Wox.Plugin.Program.ProgramSources
|
||||||
// todo: remove hard cod scale
|
// todo: remove hard cod scale
|
||||||
var path1 = $"{filename}.scale-200{extension}";
|
var path1 = $"{filename}.scale-200{extension}";
|
||||||
var path2 = $"{filename}.scale-100{extension}";
|
var path2 = $"{filename}.scale-100{extension}";
|
||||||
var uri = File.Exists(path1) ? new Uri(path1) : new Uri(path2);
|
if (File.Exists(path1))
|
||||||
var image = new BitmapImage(uri);
|
{
|
||||||
return image;
|
var image = new BitmapImage(new Uri(path1));
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
else if (File.Exists(path2))
|
||||||
|
{
|
||||||
|
var image = new BitmapImage(new Uri(path2));
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// todo: replaced with wox error logo
|
||||||
|
return new BitmapImage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private BitmapImage ImageFromStream(RandomAccessStreamReference reference)
|
private BitmapImage ImageFromStream(RandomAccessStreamReference reference)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue