mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix unix directory seperator issue
This commit is contained in:
parent
3ee3528e54
commit
5ee110b3b7
2 changed files with 5 additions and 1 deletions
|
|
@ -22,7 +22,6 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
||||||
internal const string WindowsIndexErrorImagePath = "Images\\index_error2.png";
|
internal const string WindowsIndexErrorImagePath = "Images\\index_error2.png";
|
||||||
internal const string GeneralSearchErrorImagePath = "Images\\robot_error.png";
|
internal const string GeneralSearchErrorImagePath = "Images\\robot_error.png";
|
||||||
|
|
||||||
|
|
||||||
internal const string ToolTipOpenDirectory = "Ctrl + Enter to open the directory";
|
internal const string ToolTipOpenDirectory = "Ctrl + Enter to open the directory";
|
||||||
|
|
||||||
internal const string ToolTipOpenContainingFolder = "Ctrl + Enter to open the containing folder";
|
internal const string ToolTipOpenContainingFolder = "Ctrl + Enter to open the containing folder";
|
||||||
|
|
@ -31,6 +30,8 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
||||||
|
|
||||||
internal const string DefaultContentSearchActionKeyword = "doc:";
|
internal const string DefaultContentSearchActionKeyword = "doc:";
|
||||||
|
|
||||||
|
internal const char UnixDirectorySeparator = '/';
|
||||||
|
|
||||||
internal const char DirectorySeparator = '\\';
|
internal const char DirectorySeparator = '\\';
|
||||||
|
|
||||||
internal const string WindowsIndexingOptions = "srchadmin.dll";
|
internal const string WindowsIndexingOptions = "srchadmin.dll";
|
||||||
|
|
|
||||||
|
|
@ -187,6 +187,9 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
||||||
var needToExpand = EnvironmentVariables.HasEnvironmentVar(querySearch);
|
var needToExpand = EnvironmentVariables.HasEnvironmentVar(querySearch);
|
||||||
var path = needToExpand ? Environment.ExpandEnvironmentVariables(querySearch) : querySearch;
|
var path = needToExpand ? Environment.ExpandEnvironmentVariables(querySearch) : querySearch;
|
||||||
|
|
||||||
|
// if user uses the unix directory separator, we need to convert it to windows directory separator
|
||||||
|
path = path.Replace(Constants.UnixDirectorySeparator, Constants.DirectorySeparator);
|
||||||
|
|
||||||
// Check that actual location exists, otherwise directory search will throw directory not found exception
|
// Check that actual location exists, otherwise directory search will throw directory not found exception
|
||||||
if (!FilesFolders.ReturnPreviousDirectoryIfIncompleteString(path).LocationExists())
|
if (!FilesFolders.ReturnPreviousDirectoryIfIncompleteString(path).LocationExists())
|
||||||
return results.ToList();
|
return results.ToList();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue