diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
index 0798857ed..0762be5b7 100644
--- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
+++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
@@ -25,23 +25,29 @@ namespace Flow.Launcher.Plugin.Program.Programs
public string Name { get; set; }
public string UniqueIdentifier { get => _uid; set => _uid = value == null ? string.Empty : value.ToLowerInvariant(); } // For path comparison
public string IcoPath { get; set; }
+
///
/// Path of the file. It's the path of .lnk and .url for .lnk and .url files.
///
public string FullPath { get; set; }
+
///
/// Path of the executable for .lnk, or the URL for .url. Arguments are included if any.
///
public string LnkResolvedPath { get; set; }
+
///
/// Path of the actual executable file. Args are included.
///
public string ExecutablePath => LnkResolvedPath ?? FullPath;
+
public string ParentDirectory { get; set; }
+
///
/// Name of the executable for .lnk files
///
public string ExecutableName { get; set; }
+
public string Description { get; set; }
public bool Valid { get; set; }
public bool Enabled { get; set; }
@@ -199,9 +205,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
{
var info = new ProcessStartInfo
{
- FileName = FullPath,
- WorkingDirectory = ParentDirectory,
- UseShellExecute = true
+ FileName = FullPath, WorkingDirectory = ParentDirectory, UseShellExecute = true
};
Task.Run(() => Main.StartProcess(ShellCommand.RunAsDifferentUser, info));
@@ -363,6 +367,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
{
return program;
}
+
foreach (var protocol in protocols)
{
if (url.StartsWith(protocol))
@@ -418,10 +423,12 @@ namespace Flow.Launcher.Plugin.Program.Programs
if (!Directory.Exists(directory))
return Enumerable.Empty();
- return Directory.EnumerateFiles(directory, "*", new EnumerationOptions
- {
- IgnoreInaccessible = true, RecurseSubdirectories = recursive
- }).Where(x => suffixes.Contains(Extension(x)));
+ return Directory
+ .EnumerateFiles(
+ directory,
+ "*",
+ new EnumerationOptions { IgnoreInaccessible = true, RecurseSubdirectories = recursive })
+ .Where(x => suffixes.Contains(Extension(x)));
}
private static string Extension(string path)
@@ -471,7 +478,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
}
var paths = pathEnv.Split(";", StringSplitOptions.RemoveEmptyEntries).DistinctBy(p => p.ToLowerInvariant());
-
+
var toFilter = paths.Where(x => commonParents.All(parent => !FilesFolders.PathContains(parent, x)))
.AsParallel()
.SelectMany(p => EnumerateProgramsInDir(p, suffixes, recursive: false));