Merge branch 'dev' into bump_version_app_plugins

This commit is contained in:
Jeremy Wu 2020-11-20 06:14:05 +11:00
commit 8e58048a67
3 changed files with 13 additions and 9 deletions

View file

@ -98,17 +98,17 @@ namespace Flow.Launcher.Plugin.Program.Logger
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);
}

View file

@ -131,7 +131,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
? $"/select,\"{FullPath}\""
: Settings.ExplorerArgs;
Main.StartProcess(Process.Start,
Main.StartProcess(Process.Start,
new ProcessStartInfo(
!string.IsNullOrWhiteSpace(Main._settings.CustomizedExplorer)
? Main._settings.CustomizedExplorer
@ -267,10 +267,14 @@ namespace Flow.Launcher.Plugin.Program.Programs
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)
{

View file

@ -4,7 +4,7 @@
"Name": "Program",
"Description": "Search programs in Flow.Launcher",
"Author": "qianlifeng",
"Version": "1.2.0",
"Version": "1.2.1",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Program.dll",