Skip to content

Commit 9e11b0c

Browse files
author
TheBestPessimist
committed
whitespace
1 parent 51c9098 commit 9e11b0c

File tree

1 file changed

+15
-8
lines changed
  • Plugins/Flow.Launcher.Plugin.Program/Programs

1 file changed

+15
-8
lines changed

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

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,29 @@ public class Win32 : IProgram, IEquatable<Win32>
2525
public string Name { get; set; }
2626
public string UniqueIdentifier { get => _uid; set => _uid = value == null ? string.Empty : value.ToLowerInvariant(); } // For path comparison
2727
public string IcoPath { get; set; }
28+
2829
/// <summary>
2930
/// Path of the file. It's the path of .lnk and .url for .lnk and .url files.
3031
/// </summary>
3132
public string FullPath { get; set; }
33+
3234
/// <summary>
3335
/// Path of the executable for .lnk, or the URL for .url. Arguments are included if any.
3436
/// </summary>
3537
public string LnkResolvedPath { get; set; }
38+
3639
/// <summary>
3740
/// Path of the actual executable file. Args are included.
3841
/// </summary>
3942
public string ExecutablePath => LnkResolvedPath ?? FullPath;
43+
4044
public string ParentDirectory { get; set; }
45+
4146
/// <summary>
4247
/// Name of the executable for .lnk files
4348
/// </summary>
4449
public string ExecutableName { get; set; }
50+
4551
public string Description { get; set; }
4652
public bool Valid { get; set; }
4753
public bool Enabled { get; set; }
@@ -199,9 +205,7 @@ public List<Result> ContextMenus(IPublicAPI api)
199205
{
200206
var info = new ProcessStartInfo
201207
{
202-
FileName = FullPath,
203-
WorkingDirectory = ParentDirectory,
204-
UseShellExecute = true
208+
FileName = FullPath, WorkingDirectory = ParentDirectory, UseShellExecute = true
205209
};
206210

207211
Task.Run(() => Main.StartProcess(ShellCommand.RunAsDifferentUser, info));
@@ -363,6 +367,7 @@ private static Win32 UrlProgram(string path, string[] protocols)
363367
{
364368
return program;
365369
}
370+
366371
foreach (var protocol in protocols)
367372
{
368373
if (url.StartsWith(protocol))
@@ -418,10 +423,12 @@ private static IEnumerable<string> EnumerateProgramsInDir(string directory, stri
418423
if (!Directory.Exists(directory))
419424
return Enumerable.Empty<string>();
420425

421-
return Directory.EnumerateFiles(directory, "*", new EnumerationOptions
422-
{
423-
IgnoreInaccessible = true, RecurseSubdirectories = recursive
424-
}).Where(x => suffixes.Contains(Extension(x)));
426+
return Directory
427+
.EnumerateFiles(
428+
directory,
429+
"*",
430+
new EnumerationOptions { IgnoreInaccessible = true, RecurseSubdirectories = recursive })
431+
.Where(x => suffixes.Contains(Extension(x)));
425432
}
426433

427434
private static string Extension(string path)
@@ -471,7 +478,7 @@ private static IEnumerable<Win32> PATHPrograms(string[] suffixes, string[] proto
471478
}
472479

473480
var paths = pathEnv.Split(";", StringSplitOptions.RemoveEmptyEntries).DistinctBy(p => p.ToLowerInvariant());
474-
481+
475482
var toFilter = paths.Where(x => commonParents.All(parent => !FilesFolders.PathContains(parent, x)))
476483
.AsParallel()
477484
.SelectMany(p => EnumerateProgramsInDir(p, suffixes, recursive: false));

0 commit comments

Comments
 (0)