Skip to content

Commit 6c7eab9

Browse files
committed
code refactoring
1 parent d3b4c54 commit 6c7eab9

File tree

1 file changed

+7
-10
lines changed
  • Plugins/Flow.Launcher.Plugin.Program/Programs

1 file changed

+7
-10
lines changed

Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -462,18 +462,15 @@ private bool CanApplicationRunElevated()
462462
{
463463
return true;
464464
}
465-
else
465+
466+
var manifest = Package.Location + "\\AppxManifest.xml";
467+
if (File.Exists(manifest))
466468
{
467-
var manifest = Package.Location + "\\AppxManifest.xml";
468-
if (File.Exists(manifest))
469-
{
470-
var file = File.ReadAllText(manifest);
469+
var file = File.ReadAllText(manifest);
471470

472-
// Using OrdinalIgnoreCase since this is used internally
473-
if (file.Contains("TrustLevel=\"mediumIL\"", StringComparison.OrdinalIgnoreCase))
474-
{
475-
return true;
476-
}
471+
if (file.Contains("TrustLevel=\"mediumIL\"", StringComparison.OrdinalIgnoreCase))
472+
{
473+
return true;
477474
}
478475
}
479476

0 commit comments

Comments
 (0)