From ec7ecfacd053a102374f15c2ed7fa618ef944215 Mon Sep 17 00:00:00 2001
From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
Date: Sun, 31 Mar 2024 01:17:05 +0800
Subject: [PATCH] Add Args property
---
.../Flow.Launcher.Plugin.Program/Programs/Win32.cs | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
index 788aa8724..61d3511b7 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
@@ -39,15 +39,20 @@ namespace Flow.Launcher.Plugin.Program.Programs
public string FullPath { get; set; }
///
- /// Path of the executable for .lnk, or the URL for .url. Arguments are included if any.
+ /// Path of the executable for .lnk, or the URL for .url
///
public string LnkResolvedPath { get; set; }
///
- /// Path of the actual executable file. Args are included.
+ /// Path of the actual executable file
///
public string ExecutablePath => LnkResolvedPath ?? FullPath;
+ ///
+ /// Arguments for the executable.
+ ///
+ public string Args { get; set; }
+
public string ParentDirectory { get; set; }
///
@@ -339,7 +344,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
var args = _helper.arguments;
if (!string.IsNullOrEmpty(args))
{
- program.LnkResolvedPath += " " + args;
+ program.Args = args;
}
var description = _helper.description;
@@ -636,7 +641,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
private static IEnumerable ProgramsHasher(IEnumerable programs)
{
var startMenuPaths = GetStartMenuPaths();
- return programs.GroupBy(p => p.ExecutablePath.ToLowerInvariant())
+ return programs.GroupBy(p => (p.ExecutablePath + p.Args).ToLowerInvariant())
.AsParallel()
.SelectMany(g =>
{