Skip to content

Commit ec7ecfa

Browse files
Add Args property
1 parent 83d59b1 commit ec7ecfa

File tree

1 file changed

+9
-4
lines changed
  • Plugins/Flow.Launcher.Plugin.Program/Programs

1 file changed

+9
-4
lines changed

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,20 @@ public string UniqueIdentifier
3939
public string FullPath { get; set; }
4040

4141
/// <summary>
42-
/// Path of the executable for .lnk, or the URL for .url. Arguments are included if any.
42+
/// Path of the executable for .lnk, or the URL for .url
4343
/// </summary>
4444
public string LnkResolvedPath { get; set; }
4545

4646
/// <summary>
47-
/// Path of the actual executable file. Args are included.
47+
/// Path of the actual executable file
4848
/// </summary>
4949
public string ExecutablePath => LnkResolvedPath ?? FullPath;
5050

51+
/// <summary>
52+
/// Arguments for the executable.
53+
/// </summary>
54+
public string Args { get; set; }
55+
5156
public string ParentDirectory { get; set; }
5257

5358
/// <summary>
@@ -339,7 +344,7 @@ private static Win32 LnkProgram(string path)
339344
var args = _helper.arguments;
340345
if (!string.IsNullOrEmpty(args))
341346
{
342-
program.LnkResolvedPath += " " + args;
347+
program.Args = args;
343348
}
344349

345350
var description = _helper.description;
@@ -636,7 +641,7 @@ public static IEnumerable<T> DistinctBy<T, R>(IEnumerable<T> source, Func<T, R>
636641
private static IEnumerable<Win32> ProgramsHasher(IEnumerable<Win32> programs)
637642
{
638643
var startMenuPaths = GetStartMenuPaths();
639-
return programs.GroupBy(p => p.ExecutablePath.ToLowerInvariant())
644+
return programs.GroupBy(p => (p.ExecutablePath + p.Args).ToLowerInvariant())
640645
.AsParallel()
641646
.SelectMany(g =>
642647
{

0 commit comments

Comments
 (0)