Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public List<Result> LoadContextMenus(Result selectedResult)
var icoPath = (record.Type == ResultType.File) ? Constants.FileImagePath : Constants.FolderImagePath;
var fileOrFolder = (record.Type == ResultType.File) ? "file" : "folder";

if (Settings.QuickAccessLinks.All(x => x.Path != record.FullPath))
if (Settings.QuickAccessLinks.All(x => !x.Path.Equals(record.FullPath, StringComparison.OrdinalIgnoreCase)))
{
contextMenus.Add(new Result
{
Expand Down
16 changes: 10 additions & 6 deletions Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ private static string ToReadableSize(long pDrvSize, int pi)

internal static Result CreateOpenCurrentFolderResult(string path, string actionKeyword, bool windowsIndexed = false)
{
var folderName = path.TrimEnd(Constants.DirectorySeperator).Split(new[]
// Path passed from PathSearchAsync ends with Constants.DirectorySeperator ('\'), need to remove the seperator
// so it's consistent with folder results returned by index search which does not end with one
var folderPath = path.TrimEnd(Constants.DirectorySeperator);

var folderName = folderPath.TrimEnd(Constants.DirectorySeperator).Split(new[]
{
Path.DirectorySeparatorChar
}, StringSplitOptions.None).Last();
Expand All @@ -185,19 +189,19 @@ internal static Result CreateOpenCurrentFolderResult(string path, string actionK
Title = title,
SubTitle = $"Use > to search within {subtitleFolderName}, " +
$"* to search for file extensions or >* to combine both searches.",
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder, actionKeyword),
IcoPath = path,
AutoCompleteText = GetPathWithActionKeyword(folderPath, ResultType.Folder, actionKeyword),
IcoPath = folderPath,
Score = 500,
CopyText = path,
CopyText = folderPath,
Action = _ =>
{
Context.API.OpenDirectory(path);
Context.API.OpenDirectory(folderPath);
return true;
},
ContextData = new SearchResult
{
Type = ResultType.Folder,
FullPath = path,
FullPath = folderPath,
WindowsIndexed = windowsIndexed
}
};
Expand Down