Upgrading Features

Now Parent folder will appear in search results.
This commit is contained in:
Aaron Campf 2014-03-30 16:26:20 -07:00
parent 6b9f96697b
commit a254b996e0

View File

@ -43,8 +43,26 @@ namespace Wox.Plugin.SystemPlugins.Folder_Links {
var Input_Name = input.Split(new string[] { @"\" }, StringSplitOptions.None).First().ToLower();
var Current_Path = Saved_Folders.FirstOrDefault(x =>
x.Split(new string[] { @"\" }, StringSplitOptions.None).Last().ToLower() == Input_Name);
if (Current_Path == null) return results;
foreach (var item in Saved_Folders) {
var Name = item.Split(new string[] { @"\" }, StringSplitOptions.None).Last();
if (Name.ToLower().StartsWith(input)) {
Result result = new Result {
Title = Name,
IcoPath = "Images/folder.png",
Action = (c) => {
context.ChangeQuery(item);
return false;
}
};
results.Add(result);
}
}
if (Current_Path == null) return results;
Current_Path += query.RawQuery.ToLower().Remove(0, Input_Name.Length);
if (Directory.Exists(Current_Path)) {