Merge pull request #68 from theClueless/uwpErrorFix

Uwperrorfix
This commit is contained in:
Jeremy Wu 2019-11-07 18:43:16 +11:00 committed by GitHub
commit c92db272e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,11 +196,20 @@ namespace Wox.Plugin.Program.Programs
ps = ps.Where(p =>
{
bool valid;
try
{
var f = p.IsFramework;
var d = p.IsDevelopmentMode;
var path = p.InstalledLocation.Path;
valid = !f && !d && !string.IsNullOrEmpty(path);
}
catch (Exception e)
{
ProgramLogger.LogException("|UWP|CurrentUserPackages|An unexpected error occured and "
+ $"unable to verify if package is valid", e);
return false;
}
var f = p.IsFramework;
var d = p.IsDevelopmentMode;
var path = p.InstalledLocation.Path;
valid = !f && !d && !string.IsNullOrEmpty(path);
return valid;
});