Merge pull request #547 from taooceros/FixEmptyPathException

Check Empty image path to avoid exception
This commit is contained in:
Jeremy Wu 2021-07-03 22:48:16 +10:00 committed by GitHub
commit c2e8147ec0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -565,7 +565,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
}
else
{
ProgramLogger.LogException($"|UWP|ImageFromPath|{path}" +
ProgramLogger.LogException($"|UWP|ImageFromPath|{(string.IsNullOrEmpty(path) ? "Not Avaliable" : path)}" +
$"|Unable to get logo for {UserModelId} from {path} and" +
$" located in {Package.Location}", new FileNotFoundException());
return new BitmapImage(new Uri(Constant.MissingImgIcon));