[PT Run] Open folder using shell instead of explorer.exe (#7292)

* pt run not using explorer.exe for opening path (#4622)

* updated explorer action name (#4622)
This commit is contained in:
Davide Giacometti
2020-10-17 01:30:11 +02:00
committed by GitHub
parent 36dd29c056
commit b80578b1b9
6 changed files with 23 additions and 22 deletions

View File

@@ -11,7 +11,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
{
public class FileItemResult : IItemResult
{
private static readonly IExplorerAction ExplorerAction = new ExplorerAction();
private static readonly IShellAction ShellAction = new ShellAction();
public string FilePath { get; set; }
@@ -27,7 +27,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_file_result_subtitle, FilePath),
IcoPath = FilePath,
TitleHighlightData = StringMatcher.FuzzySearch(Search, Path.GetFileName(FilePath)).MatchData,
Action = c => ExplorerAction.Execute(FilePath, contextApi),
Action = c => ShellAction.Execute(FilePath, contextApi),
ContextData = new SearchResult { Type = ResultType.File, FullPath = FilePath },
};
return result;