fix: path() is fixed

This commit is contained in:
huangsimin 2020-04-10 11:23:49 +08:00
parent 5600e845da
commit 85170b5b7e

View File

@ -117,13 +117,9 @@ func (hunter *Hunter) recursionTasks(cxt *TaskContext) {
tasknode.SetID(sautoid) tasknode.SetID(sautoid)
cxt.current = tasknode cxt.current = tasknode
task := tasknode.Task() cxt.current.SetPath(cxt.parent.Path()) //
// if itid, ok := task.(IIdentity); ok { task := tasknode.Task()
// ncxt.curTaskID = itid.GetID()
// } else {
// ncxt.curTaskID = sautoid
// }
if before, ok := task.(IBefore); ok { if before, ok := task.(IBefore); ok {
before.Before(cxt) before.Before(cxt)
@ -135,8 +131,8 @@ func (hunter *Hunter) recursionTasks(cxt *TaskContext) {
after.After(cxt) after.After(cxt)
} }
tasknode.SetPath(cxt.parent.Path() + "." + cxt.TaskID())
ncxt.parent = cxt.current ncxt.parent = cxt.current
ncxt.parent.SetPath(ncxt.parent.Path() + "." + ncxt.parent.TaskID()) //补正ncxt的路径
ncxt.hunter = cxt.hunter ncxt.hunter = cxt.hunter
hunter.recursionTasks(ncxt) hunter.recursionTasks(ncxt)