Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Plugins/Flow.Launcher.Plugin.Program/Logger/ProgramLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,17 @@ internal static void LogException(string classname, string callingMethodName, st
internal static void LogException(string message, Exception e)
{
//Index 0 is always empty.
var parts = message.Split('|');
var parts = message.Split('|', StringSplitOptions.RemoveEmptyEntries);
if (parts.Length < 4)
{
var logger = LogManager.GetLogger("");
logger.Error(e, $"fail to log exception in program logger, parts length is too small: {parts.Length}, message: {message}");
}

var classname = parts[1];
var callingMethodName = parts[2];
var loadingProgramPath = parts[3];
var interpretationMessage = parts[4];
var classname = parts[0];
var callingMethodName = parts[1];
var loadingProgramPath = parts[2];
var interpretationMessage = parts[3];

LogException(classname, callingMethodName, loadingProgramPath, interpretationMessage, e);
}
Expand Down
10 changes: 7 additions & 3 deletions Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public List<Result> ContextMenus(IPublicAPI api)
? $"/select,\"{FullPath}\""
: Settings.ExplorerArgs;

Main.StartProcess(Process.Start,
Main.StartProcess(Process.Start,
new ProcessStartInfo(
!string.IsNullOrWhiteSpace(Main._settings.CustomizedExplorer)
? Main._settings.CustomizedExplorer
Expand Down Expand Up @@ -267,10 +267,14 @@ private static IEnumerable<string> ProgramPaths(string directory, string[] suffi
return new string[] { };
try
{
var paths = Directory.EnumerateFiles(directory, "*", SearchOption.AllDirectories)
var paths = Directory.EnumerateFiles(directory, "*", new EnumerationOptions
{
IgnoreInaccessible = true,
RecurseSubdirectories = true
})
.Where(x => suffixes.Contains(Extension(x)));
return paths;

return paths;
}
catch (DirectoryNotFoundException e)
{
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Flow.Launcher.Plugin.Program/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "Program",
"Description": "Search programs in Flow.Launcher",
"Author": "qianlifeng",
"Version": "1.1.0",
"Version": "1.1.1",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Program.dll",
Expand Down