Skip to content

Commit 3992990

Browse files
Remove redundant extension check
1 parent ff4290c commit 3992990

File tree

1 file changed

+14
-17
lines changed
  • Plugins/Flow.Launcher.Plugin.Program/Programs

1 file changed

+14
-17
lines changed

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

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -333,26 +333,23 @@ private static Win32 LnkProgram(string path)
333333
program.LnkResolvedPath = Path.GetFullPath(target);
334334
program.ExecutableName = Path.GetFileName(target);
335335

336-
if (Extension(target) == ExeExtension)
336+
var args = _helper.arguments;
337+
if(!string.IsNullOrEmpty(args))
337338
{
338-
var args = _helper.arguments;
339-
if(!string.IsNullOrEmpty(args))
340-
{
341-
program.LnkResolvedPath += " " + args;
342-
}
339+
program.LnkResolvedPath += " " + args;
340+
}
343341

344-
var description = _helper.description;
345-
if (!string.IsNullOrEmpty(description))
346-
{
347-
program.Description = description;
348-
}
349-
else
342+
var description = _helper.description;
343+
if (!string.IsNullOrEmpty(description))
344+
{
345+
program.Description = description;
346+
}
347+
else
348+
{
349+
var info = FileVersionInfo.GetVersionInfo(target);
350+
if (!string.IsNullOrEmpty(info.FileDescription))
350351
{
351-
var info = FileVersionInfo.GetVersionInfo(target);
352-
if (!string.IsNullOrEmpty(info.FileDescription))
353-
{
354-
program.Description = info.FileDescription;
355-
}
352+
program.Description = info.FileDescription;
356353
}
357354
}
358355
}

0 commit comments

Comments
 (0)