diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/QuickAccessLinks/QuickAccess.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/QuickAccessLinks/QuickAccess.cs index 32651ecb8a7..fcf07a46b8d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/QuickAccessLinks/QuickAccess.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/QuickAccessLinks/QuickAccess.cs @@ -21,7 +21,7 @@ internal static List AccessLinkListMatched(Query query, IEnumerable ResultManager.CreateDriveSpaceDisplayResult(l.Path, query.ActionKeyword, QuickAccessResultScore), ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query, QuickAccessResultScore), - ResultType.File => ResultManager.CreateFileResult(l.Path, query, QuickAccessResultScore), + ResultType.File => ResultManager.CreateFileResult(l.Path, query, QuickAccessResultScore, name: l.Name), _ => throw new ArgumentOutOfRangeException() }) .ToList(); @@ -35,7 +35,7 @@ internal static List AccessLinkListAll(Query query, IEnumerable ResultManager.CreateDriveSpaceDisplayResult(l.Path, query.ActionKeyword, QuickAccessResultScore), ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query, QuickAccessResultScore), - ResultType.File => ResultManager.CreateFileResult(l.Path, query, QuickAccessResultScore), + ResultType.File => ResultManager.CreateFileResult(l.Path, query, QuickAccessResultScore, name: l.Name), _ => throw new ArgumentOutOfRangeException() }).ToList(); } diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs index 18eb168b9bd..2611264be7c 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs @@ -282,10 +282,10 @@ internal static Result CreateOpenCurrentFolderResult(string path, string actionK }; } - internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool windowsIndexed = false) + internal static Result CreateFileResult(string filePath, Query query, int score = 0, bool windowsIndexed = false, string name = null) { var isMedia = IsMedia(Path.GetExtension(filePath)); - var title = Path.GetFileName(filePath) ?? string.Empty; + var title = name ?? Path.GetFileName(filePath) ?? string.Empty; var directory = Path.GetDirectoryName(filePath) ?? string.Empty; /* Preview Detail */