1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2022-02-25 19:38:47 +08:00
parent e154b0fa18
commit 7b99b1cc29

View File

@ -2,7 +2,7 @@ package wiki
import (
"os"
"strings"
"path"
ice "shylinux.com/x/icebergs"
"shylinux.com/x/icebergs/base/lex"
@ -23,7 +23,9 @@ func init() {
_wiki_upload(m, m.CommandKey(), m.Option(nfs.PATH))
}},
mdb.REMOVE: {Name: "remove", Help: "删除", Hand: func(m *ice.Message, arg ...string) {
os.Remove(strings.TrimPrefix(arg[0], web.SHARE_LOCAL))
p := path.Join(m.Config(nfs.PATH), path.Join(arg...))
m.Debug("remove %v", p)
os.Remove(p)
}},
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
_wiki_list(m, m.CommandKey(), kit.Select(nfs.PWD, arg, 0))