mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
rename method to reflect behaviour
This commit is contained in:
parent
5c46464a41
commit
2225cbff92
5 changed files with 9 additions and 9 deletions
|
|
@ -187,11 +187,11 @@ namespace Flow.Launcher.Plugin.SharedCommands
|
|||
}
|
||||
|
||||
///<summary>
|
||||
/// Gets the previous level directory from a path string.
|
||||
/// Does not check that previous level directory exists and returns
|
||||
/// passed in string if is complete path
|
||||
/// Returns the previous level directory if path incomplete.
|
||||
/// Does not check if previous level directory exists.
|
||||
/// Returns passed in string if is complete path
|
||||
///</summary>
|
||||
public static string GetPreviousLevelDirectoryIfPathIncomplete(string path)
|
||||
public static string ReturnPreviousDirectoryIfIncompleteString(string path)
|
||||
{
|
||||
if (!path.EndsWith("\\"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ namespace Flow.Launcher.Test.Plugins
|
|||
public void WhenGivenAPath_ThenShouldReturnThePreviousDirectoryPathIfIncompleteOrOriginalString(
|
||||
string path, string expectedString)
|
||||
{
|
||||
var returnedPath = FilesFolders.GetPreviousLevelDirectoryIfPathIncomplete(path);
|
||||
var returnedPath = FilesFolders.ReturnPreviousDirectoryIfIncompleteString(path);
|
||||
|
||||
//Then
|
||||
Assert.IsTrue(returnedPath == expectedString,
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.DirectoryInfo
|
|||
{
|
||||
var results = new List<Result>();
|
||||
|
||||
var path = FilesFolders.GetPreviousLevelDirectoryIfPathIncomplete(search);
|
||||
var path = FilesFolders.ReturnPreviousDirectoryIfIncompleteString(search);
|
||||
|
||||
var folderList = new List<Result>();
|
||||
var fileList = new List<Result>();
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
|
||||
internal static Result CreateOpenCurrentFolderResult(string path, bool windowsIndexed = false)
|
||||
{
|
||||
var retrievedDirectoryPath = FilesFolders.GetPreviousLevelDirectoryIfPathIncomplete(path);
|
||||
var retrievedDirectoryPath = FilesFolders.ReturnPreviousDirectoryIfIncompleteString(path);
|
||||
|
||||
var folderName = retrievedDirectoryPath.TrimEnd(Constants.DirectorySeperator).Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.None).Last();
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
|
||||
var results = new List<Result>();
|
||||
|
||||
if (!FilesFolders.LocationExists(FilesFolders.GetPreviousLevelDirectoryIfPathIncomplete(locationPath)))
|
||||
if (!FilesFolders.LocationExists(FilesFolders.ReturnPreviousDirectoryIfIncompleteString(locationPath)))
|
||||
return results;
|
||||
|
||||
var useIndexSearch = UseWindowsIndexForDirectorySearch(locationPath);
|
||||
|
|
@ -113,7 +113,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
return false;
|
||||
|
||||
if (_settings.WindowsIndexExcludedDirectories
|
||||
.Any(x => x.Path == FilesFolders.GetPreviousLevelDirectoryIfPathIncomplete(locationPath)))
|
||||
.Any(x => x.Path == FilesFolders.ReturnPreviousDirectoryIfIncompleteString(locationPath)))
|
||||
return false;
|
||||
|
||||
return _indexSearch.PathIsIndexed(locationPath);
|
||||
|
|
|
|||
Loading…
Reference in a new issue