diff --git a/base/nfs/dir.go b/base/nfs/dir.go index 02548010..d6ec8d9f 100644 --- a/base/nfs/dir.go +++ b/base/nfs/dir.go @@ -183,7 +183,7 @@ func init() { m.Logs(mdb.SELECT, DIR_ROOT, root) } _dir_list(m, root, dir, 0, m.Option(DIR_DEEP) == ice.TRUE, kit.Select(TYPE_BOTH, m.Option(DIR_TYPE)), kit.Regexp(m.Option(DIR_REG)), fields) - m.Sort(PATH).StatusTimeCount() + m.StatusTimeCount() }}, }) } diff --git a/base/nfs/pack.go b/base/nfs/pack.go index 557c6a98..b05b370c 100644 --- a/base/nfs/pack.go +++ b/base/nfs/pack.go @@ -96,7 +96,7 @@ func ReadDir(m *ice.Message, p string) ([]os.FileInfo, error) { list, e := OptionFiles(m).ReadDir(p) for i := 0; i < len(list)-1; i++ { for j := i + 1; j < len(list); j++ { - if list[i].Name() > list[j].Name() { + if !list[i].IsDir() && list[j].IsDir() || list[i].Name() > list[j].Name() { list[i], list[j] = list[j], list[i] } } diff --git a/core/team/plan.go b/core/team/plan.go index 33ff84b3..4de20ef6 100644 --- a/core/team/plan.go +++ b/core/team/plan.go @@ -59,6 +59,9 @@ func init() { PLAN: {Name: "plan scale=week,day,week,month,year,long begin_time@date list", Help: "计划", Actions: ice.MergeActions(ice.Actions{ mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(TODO, mdb.INPUTS, arg) }}, mdb.PLUGIN: {Name: "plugin extra.index extra.args", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(TASK, mdb.MODIFY, arg) }}, + mdb.INSERT: {Name: "insert zone type=once,step,week name text begin_time@date close_time@date", Hand: func(m *ice.Message, arg ...string) { + m.Cmdy(TASK, mdb.INSERT, arg) + }}, ice.RUN: {Hand: func(m *ice.Message, arg ...string) { if m.RenameOption(TASK_POD, ice.POD); ctx.PodCmd(m, m.PrefixKey(), ice.RUN, arg) { return