1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
harveyshao 2022-12-08 22:42:39 +08:00
parent 1fe85e82f7
commit d8ee0e91c3
3 changed files with 5 additions and 2 deletions

View File

@ -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()
}},
})
}

View File

@ -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]
}
}

View File

@ -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