Skip to content

Commit 3effb40

Browse files
committed
make it become an extension method
1 parent b426dd1 commit 3effb40

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static void OpenContainingFolder(string path)
148148
/// This checks whether a given string is a directory path or network location string.
149149
/// It does not check if location actually exists.
150150
///</summary>
151-
public static bool IsLocationPathString(string querySearchString)
151+
public static bool IsLocationPathString(this string querySearchString)
152152
{
153153
if (string.IsNullOrEmpty(querySearchString) || querySearchString.Length < 3)
154154
return false;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ internal async Task<List<Result>> SearchAsync(Query query, CancellationToken tok
5858
// Query is a location path with a full environment variable, eg. %appdata%\somefolder\
5959
var isEnvironmentVariablePath = querySearch[1..].Contains("%\\");
6060

61-
if (!FilesFolders.IsLocationPathString(querySearch) && !isEnvironmentVariablePath)
61+
if (!querySearch.IsLocationPathString() && !isEnvironmentVariablePath)
6262
{
6363
results.AddRange(await WindowsIndexFilesAndFoldersSearchAsync(query, querySearch, token).ConfigureAwait(false));
6464

@@ -70,7 +70,7 @@ internal async Task<List<Result>> SearchAsync(Query query, CancellationToken tok
7070
if (isEnvironmentVariablePath)
7171
locationPath = EnvironmentVariables.TranslateEnvironmentVariablePath(locationPath);
7272

73-
if (!FilesFolders.LocationExists(FilesFolders.ReturnPreviousDirectoryIfIncompleteString(locationPath)))
73+
if (!FilesFolders.ReturnPreviousDirectoryIfIncompleteString(locationPath).IsLocationPathString())
7474
return results;
7575

7676
var useIndexSearch = UseWindowsIndexForDirectorySearch(locationPath);

0 commit comments

Comments
 (0)