Skip to content

Commit a3cc5e2

Browse files
committed
Fix unix directory seperator issue
1 parent 38eb07a commit a3cc5e2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ internal static class Constants
3131

3232
internal const string DefaultContentSearchActionKeyword = "doc:";
3333

34+
internal const char UnixDirectorySeparator = '/';
35+
3436
internal const char DirectorySeparator = '\\';
3537

3638
internal const string WindowsIndexingOptions = "srchadmin.dll";

Plugins/Flow.Launcher.Plugin.Explorer/Search/DirectoryInfo/DirectoryInfoSearch.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Flow.Launcher.Infrastructure.Logger;
1+
using Flow.Launcher.Infrastructure.Logger;
22
using Flow.Launcher.Plugin.SharedCommands;
33
using System;
44
using System.Collections.Generic;
@@ -12,6 +12,9 @@ public static class DirectoryInfoSearch
1212
{
1313
internal static IEnumerable<SearchResult> TopLevelDirectorySearch(Query query, string search, CancellationToken token)
1414
{
15+
// if user uses the unix directory separator, we need to convert it to windows directory separator
16+
search = search.Replace(Constants.UnixDirectorySeparator, Constants.DirectorySeparator);
17+
1518
var criteria = ConstructSearchCriteria(search);
1619

1720
if (search.LastIndexOf(Constants.AllFilesFolderSearchWildcard) >

0 commit comments

Comments
 (0)