1
0
mirror of https://shylinux.com/x/icebergs synced 2025-05-03 03:57:01 +08:00

opt webpack

This commit is contained in:
harveyshao 2022-02-14 16:49:46 +08:00
parent 6004693ca4
commit ec3d847010
3 changed files with 5 additions and 3 deletions

View File

@ -20,7 +20,7 @@ func _dir_list(m *ice.Message, root string, name string, level int, deep bool, d
return m // 没有权限
}
if len(ice.Info.Pack) > 0 && name != ice.USR {
if len(ice.Info.Pack) > 0 && m.Option(DIR_PACK) == ice.TRUE {
for k, b := range ice.Info.Pack {
p := strings.TrimPrefix(k, root)
if !strings.HasPrefix(p, name) {
@ -31,7 +31,7 @@ func _dir_list(m *ice.Message, root string, name string, level int, deep bool, d
}
}
m.Debug("cat binpack %s", p)
m.Debug("dir binpack %s", p)
for _, field := range fields {
switch field {
case PATH:
@ -209,6 +209,7 @@ const (
TYPE_BOTH = "both"
)
const (
DIR_PACK = "dir_pack"
DIR_ROOT = "dir_root"
DIR_TYPE = "dir_type"
DIR_DEEP = "dir_deep"

View File

@ -88,7 +88,7 @@ func _dream_show(m *ice.Message, name string) {
m.Optionv(cli.CMD_OUTPUT, path.Join(p, m.Config(kit.Keys(cli.ENV, cli.CTX_LOG))))
// 启动任务
bin := cli.SystemFind(m, "ice.bin", kit.Path(path.Join(p, ice.BIN)), "./bin")
bin := cli.SystemFind(m, "ice.bin", kit.Path(path.Join(p, ice.BIN)), kit.Path(ice.BIN))
m.Cmd(cli.DAEMON, kit.Select(kit.Path(os.Args[0]), bin), SPACE, tcp.DIAL, ice.DEV, ice.OPS, mdb.NAME, name, m.OptionSimple(RIVER))
defer m.Event(DREAM_CREATE, kit.SimpleKV("", m.Option(mdb.TYPE), name)...)
m.Sleep3s()

View File

@ -46,6 +46,7 @@ func init() {
m.Option(nfs.DIR_ROOT, dir)
m.Option(nfs.DIR_DEEP, true)
m.Option(nfs.DIR_PACK, true)
m.Option(nfs.DIR_TYPE, nfs.CAT)
for _, k := range []string{"lib", "panel", "plugin"} {