mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 19:49:15 +08:00
updated to use share folder
This commit is contained in:
parent
7e61b1ecad
commit
37a4eefc46
@ -44,7 +44,7 @@ namespace Wox.Plugin.Folder
|
|||||||
var results = GetUserFolderResults(query);
|
var results = GetUserFolderResults(query);
|
||||||
|
|
||||||
string search = query.Search.ToLower();
|
string search = query.Search.ToLower();
|
||||||
if (_driverNames != null && !_driverNames.Any(search.StartsWith))
|
if (!IsDriveOrSharedFolder(search))
|
||||||
return results;
|
return results;
|
||||||
|
|
||||||
results.AddRange(QueryInternal_Directory_Exists(query));
|
results.AddRange(QueryInternal_Directory_Exists(query));
|
||||||
@ -58,6 +58,26 @@ namespace Wox.Plugin.Folder
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool IsDriveOrSharedFolder(string search)
|
||||||
|
{
|
||||||
|
if (search.StartsWith(@"\\"))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_driverNames != null && _driverNames.Any(search.StartsWith))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_driverNames == null && search.Length > 2 && char.IsLetter(search[0]) && search[1] == ':')
|
||||||
|
{
|
||||||
|
return true; // we don't know so let's give it the possibility
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private Result CreateFolderResult(string title, string path)
|
private Result CreateFolderResult(string title, string path)
|
||||||
{
|
{
|
||||||
return new Result
|
return new Result
|
||||||
|
Loading…
Reference in New Issue
Block a user