diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml index eefd6f4eb53..9f60aaa4340 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml @@ -162,6 +162,9 @@ Do you want to enable content search for Everything? It can be very slow without index (which is only supported in Everything v1.5+) + Unable to find Everything.exe + Failed to install Everything, please install it manually + Native Context Menu Display native context menu (experimental) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchManager.cs index 6c9155539fe..ce71c94ba34 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchManager.cs @@ -11,6 +11,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything { public class EverythingSearchManager : IIndexProvider, IContentIndexProvider, IPathIndexProvider { + private static readonly string ClassName = nameof(EverythingSearchManager); + private Settings Settings { get; } public EverythingSearchManager(Settings settings) @@ -42,19 +44,32 @@ private async ValueTask ThrowIfEverythingNotAvailableAsync(CancellationToken tok private async ValueTask ClickToInstallEverythingAsync(ActionContext _) { - var installedPath = await EverythingDownloadHelper.PromptDownloadIfNotInstallAsync(Settings.EverythingInstalledPath, Main.Context.API); + try + { + var installedPath = await EverythingDownloadHelper.PromptDownloadIfNotInstallAsync(Settings.EverythingInstalledPath, Main.Context.API); + + if (installedPath == null) + { + Main.Context.API.ShowMsgError(Main.Context.API.GetTranslation("flowlauncher_plugin_everything_not_found")); + Main.Context.API.LogError(ClassName, "Unable to find Everything.exe"); + + return false; + } - if (installedPath == null) + Settings.EverythingInstalledPath = installedPath; + Process.Start(installedPath, "-startup"); + + return true; + } + // Sometimes Everything installation will fail because of permission issues or file not found issues + // Just let the user know that Everything is not installed properly and ask them to install it manually + catch (Exception e) { - Main.Context.API.ShowMsgError("Unable to find Everything.exe"); + Main.Context.API.ShowMsgError(Main.Context.API.GetTranslation("flowlauncher_plugin_everything_install_issue")); + Main.Context.API.LogException(ClassName, "Failed to install Everything", e); return false; } - - Settings.EverythingInstalledPath = installedPath; - Process.Start(installedPath, "-startup"); - - return true; } public async IAsyncEnumerable SearchAsync(string search, [EnumeratorCancellation] CancellationToken token)