mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
added share folder
This commit is contained in:
parent
06b9d68eb7
commit
3f3deb8e2a
1 changed files with 21 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ namespace Wox.Plugin.Folder
|
|||
var results = GetUserFolderResults(query);
|
||||
|
||||
string search = query.Search.ToLower();
|
||||
if (_driverNames != null && !_driverNames.Any(search.StartsWith))
|
||||
if (!IsDriveOrSharedFolder(search))
|
||||
return results;
|
||||
|
||||
results.AddRange(QueryInternal_Directory_Exists(query));
|
||||
|
|
@ -58,6 +58,26 @@ namespace Wox.Plugin.Folder
|
|||
return results;
|
||||
}
|
||||
|
||||
private static bool IsDriveOrSharedFolder(string search)
|
||||
{
|
||||
if (search.StartsWith(@"\\"))
|
||||
{ // share folder
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_driverNames != null && _driverNames.Any(search.StartsWith))
|
||||
{ // normal drive letter
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_driverNames == null && search.Length > 2 && char.IsLetter(search[0]) && search[1] == ':')
|
||||
{ // when we don't have the drive letters we can try...
|
||||
return true; // we don't know so let's give it the possibility
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private Result CreateFolderResult(string title, string path, string queryActionKeyword)
|
||||
{
|
||||
return new Result
|
||||
|
|
|
|||
Loading…
Reference in a new issue