mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
add some
This commit is contained in:
parent
8782b192e3
commit
00d0a3f449
@ -116,11 +116,16 @@ func _serve_static(msg *ice.Message, w http.ResponseWriter, r *http.Request) boo
|
||||
}
|
||||
if pp = path.Join(pp, p); nfs.Exists(msg, pp) {
|
||||
return Render(msg, ice.RENDER_DOWNLOAD, pp)
|
||||
} else {
|
||||
} else if nfs.Exists(msg, p) {
|
||||
return Render(msg, ice.RENDER_DOWNLOAD, p)
|
||||
}
|
||||
}
|
||||
return (!ispod && kit.HasPrefix(p, nfs.SRC) || kit.HasPrefix(p, ice.USR_ICEBERGS, ice.USR_ICONS)) && nfs.Exists(msg, p) && Render(msg, ice.RENDER_DOWNLOAD, p)
|
||||
if kit.HasPrefix(p, ice.USR_ICEBERGS, ice.USR_ICONS) && nfs.Exists(msg, p) {
|
||||
return Render(msg, ice.RENDER_DOWNLOAD, p)
|
||||
}
|
||||
if !ispod {
|
||||
return (kit.HasPrefix(p, nfs.SRC) && nfs.Exists(msg, p)) && Render(msg, ice.RENDER_DOWNLOAD, p)
|
||||
}
|
||||
} else if kit.HasPrefix(r.URL.Path, nfs.M) {
|
||||
p := nfs.USR_MODULES + strings.TrimPrefix(r.URL.Path, nfs.M)
|
||||
return nfs.Exists(msg, p) && Render(msg, ice.RENDER_DOWNLOAD, p)
|
||||
|
@ -184,10 +184,13 @@ func ShareLocalFile(m *ice.Message, arg ...string) {
|
||||
if m.Option(ice.POD) != "" && nfs.Exists(m, path.Join(ice.USR_LOCAL_WORK, m.Option(ice.POD))) {
|
||||
if pp := kit.Path(ice.USR_LOCAL_WORK, m.Option(ice.POD), p); nfs.Exists(m, pp) {
|
||||
m.RenderDownload(pp)
|
||||
return
|
||||
} else if nfs.Exists(m, p) {
|
||||
m.RenderDownload(p)
|
||||
return
|
||||
}
|
||||
} else if m.Option(ice.POD) == "" || (kit.HasPrefix(p, ice.USR_ICONS, ice.USR_VOLCANOS, ice.USR_ICEBERGS, ice.USR_INTSHELL) && nfs.Exists(m, p)) {
|
||||
}
|
||||
if m.Option(ice.POD) == "" || (kit.HasPrefix(p, ice.USR_ICONS, ice.USR_VOLCANOS, ice.USR_ICEBERGS, ice.USR_INTSHELL) && nfs.Exists(m, p)) {
|
||||
m.RenderDownload(p)
|
||||
} else if pp := kit.Path(ice.USR_LOCAL_WORK, m.Option(ice.POD), p); nfs.Exists(m, pp) {
|
||||
m.RenderDownload(pp)
|
||||
|
@ -1,6 +1,7 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"shylinux.com/x/go-git/v5/config"
|
||||
@ -59,8 +60,7 @@ func init() {
|
||||
m.ProcessHold()
|
||||
}},
|
||||
web.DREAM_TABLES: {Hand: func(m *ice.Message, arg ...string) {
|
||||
// if !m.IsDebug() || !aaa.IsTechOrRoot(m) || !nfs.Exists(m, path.Join(ice.USR_LOCAL_WORK, m.Option(mdb.NAME), _GIT)) {
|
||||
if !m.IsDebug() || !aaa.IsTechOrRoot(m) {
|
||||
if !m.IsDebug() || !aaa.IsTechOrRoot(m) || !nfs.Exists(m, path.Join(ice.USR_LOCAL_WORK, m.Option(mdb.NAME), _GIT)) {
|
||||
m.Push(mdb.TEXT, "")
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user