1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-25 17:18:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-01-31 10:26:51 +08:00
parent 8782b192e3
commit 00d0a3f449
3 changed files with 13 additions and 5 deletions

View File

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

View File

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

View File

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