From 3992990ccb3cd26c00ee29e158eb4c0ba7c06a91 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sun, 1 Jan 2023 00:24:36 +0800 Subject: [PATCH] Remove redundant extension check --- .../Programs/Win32.cs | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index fafe7d5bf..e9aeb03a8 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -333,26 +333,23 @@ namespace Flow.Launcher.Plugin.Program.Programs program.LnkResolvedPath = Path.GetFullPath(target); program.ExecutableName = Path.GetFileName(target); - if (Extension(target) == ExeExtension) + var args = _helper.arguments; + if(!string.IsNullOrEmpty(args)) { - var args = _helper.arguments; - if(!string.IsNullOrEmpty(args)) - { - program.LnkResolvedPath += " " + args; - } + program.LnkResolvedPath += " " + args; + } - var description = _helper.description; - if (!string.IsNullOrEmpty(description)) + var description = _helper.description; + if (!string.IsNullOrEmpty(description)) + { + program.Description = description; + } + else + { + var info = FileVersionInfo.GetVersionInfo(target); + if (!string.IsNullOrEmpty(info.FileDescription)) { - program.Description = description; - } - else - { - var info = FileVersionInfo.GetVersionInfo(target); - if (!string.IsNullOrEmpty(info.FileDescription)) - { - program.Description = info.FileDescription; - } + program.Description = info.FileDescription; } } }