fix closure bug

sometimes will always open the last action item.
This commit is contained in:
cxfksword 2014-03-18 18:49:03 +08:00
parent 6dcd2e4b03
commit d0d6ddd3c1

View File

@ -19,15 +19,16 @@ namespace Wox.Plugin.Everything
IEnumerable<string> enumerable = api.Search(query.ActionParameters[0], 0, 100);
foreach (string s in enumerable)
{
var path = s;
Result r = new Result();
r.Title = Path.GetFileName(s);
r.SubTitle = s;
r.Title = Path.GetFileName(path);
r.SubTitle = path;
r.Action = (c) =>
{
context.HideApp();
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo();
info.UseShellExecute = true;
info.FileName = s;
info.FileName = path;
try
{
System.Diagnostics.Process.Start(info);