mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
opt some
This commit is contained in:
parent
c676c9d024
commit
268d363a57
@ -173,13 +173,19 @@ const DIR = "dir"
|
||||
|
||||
func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
DIR: {Name: "dir path field auto upload", Help: "目录", Actions: ice.Actions{
|
||||
DIR: {Name: "dir path field auto upload what", Help: "目录", Actions: ice.Actions{
|
||||
mdb.UPLOAD: {Name: "upload", Help: "上传", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy("web.cache", "upload_watch", m.Option(PATH))
|
||||
}},
|
||||
TRASH: {Name: "trash", Help: "删除", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(TRASH, mdb.CREATE, m.Option(PATH))
|
||||
}},
|
||||
"what": {Name: "trash", Help: "what", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Option(DIR_ROOT, "usr/volcanos/plugin/local/code/inner/")
|
||||
m.Option(DIR_DEEP, "true")
|
||||
m.Cmdy(DIR, PWD)
|
||||
m.Sort("path")
|
||||
}},
|
||||
}, Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.Option(DIR_ROOT) != "" {
|
||||
m.Logs(mdb.SELECT, DIR_ROOT, m.Option(DIR_ROOT))
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
func _binpack_file(m *ice.Message, w io.Writer, arg ...string) { // file name
|
||||
if f, e := nfs.OpenFile(m, arg[0]); e == nil {
|
||||
defer f.Close()
|
||||
if b, e := ioutil.ReadAll(f); e == nil && len(b) > 0 {
|
||||
if b, _ := ioutil.ReadAll(f); len(b) > 0 {
|
||||
fmt.Fprintf(w, " \"%s\": \"%s\",\n", kit.Select(arg[0], arg, 1), base64.StdEncoding.EncodeToString(b))
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user