diff --git a/Wox.Plugin.SystemPlugins/Program/IProgramSource.cs b/Wox.Plugin.SystemPlugins/Program/IProgramSource.cs index 44eb232e6f..f2443c46f7 100644 --- a/Wox.Plugin.SystemPlugins/Program/IProgramSource.cs +++ b/Wox.Plugin.SystemPlugins/Program/IProgramSource.cs @@ -32,7 +32,7 @@ namespace Wox.Plugin.SystemPlugins.Program switch (Path.GetExtension(file).ToLower()) { case ".exe": - p.ExecuteName = global::System.IO.Path.GetFileName(file); + p.ExecuteName = Path.GetFileName(file); try { FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(file); diff --git a/Wox.Plugin.SystemPlugins/Program/ProgramSources/FileSystemProgramSource.cs b/Wox.Plugin.SystemPlugins/Program/ProgramSources/FileSystemProgramSource.cs index a1985a7ede..c913143607 100644 --- a/Wox.Plugin.SystemPlugins/Program/ProgramSources/FileSystemProgramSource.cs +++ b/Wox.Plugin.SystemPlugins/Program/ProgramSources/FileSystemProgramSource.cs @@ -30,8 +30,10 @@ namespace Wox.Plugin.SystemPlugins.Program.ProgramSources public override List LoadPrograms() { List list = new List(); - GetAppFromDirectory(BaseDirectory, list); - + if (Directory.Exists(BaseDirectory)) + { + GetAppFromDirectory(BaseDirectory, list); + } return list; } diff --git a/Wox/Helper/Forker.cs b/Wox/Helper/Forker.cs index ab7b284715..658e2e5b86 100644 --- a/Wox/Helper/Forker.cs +++ b/Wox/Helper/Forker.cs @@ -105,8 +105,19 @@ namespace Wox.Helper ThreadPool.QueueUserWorkItem(delegate { Exception exception = null; - try { action(); } - catch (Exception ex) { exception = ex; } + try + { + action(); + } + catch (Exception ex) + { + exception = ex; +#if (DEBUG) + { + throw; + } +#endif + } OnItemComplete(state, exception); }); return this;