Skip to content

Commit 5ee110b

Browse files
committed
Fix unix directory seperator issue
1 parent 3ee3528 commit 5ee110b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ internal static class Constants
2222
internal const string WindowsIndexErrorImagePath = "Images\\index_error2.png";
2323
internal const string GeneralSearchErrorImagePath = "Images\\robot_error.png";
2424

25-
2625
internal const string ToolTipOpenDirectory = "Ctrl + Enter to open the directory";
2726

2827
internal const string ToolTipOpenContainingFolder = "Ctrl + Enter to open the containing folder";
@@ -31,6 +30,8 @@ internal static class Constants
3130

3231
internal const string DefaultContentSearchActionKeyword = "doc:";
3332

33+
internal const char UnixDirectorySeparator = '/';
34+
3435
internal const char DirectorySeparator = '\\';
3536

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ private async Task<List<Result>> PathSearchAsync(Query query, CancellationToken
187187
var needToExpand = EnvironmentVariables.HasEnvironmentVar(querySearch);
188188
var path = needToExpand ? Environment.ExpandEnvironmentVariables(querySearch) : querySearch;
189189

190+
// if user uses the unix directory separator, we need to convert it to windows directory separator
191+
path = path.Replace(Constants.UnixDirectorySeparator, Constants.DirectorySeparator);
192+
190193
// Check that actual location exists, otherwise directory search will throw directory not found exception
191194
if (!FilesFolders.ReturnPreviousDirectoryIfIncompleteString(path).LocationExists())
192195
return results.ToList();

0 commit comments

Comments
 (0)