diff --git a/Makefile b/Makefile index 9822aad7..a503d711 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ install: @go get github.com/gomarkdown/markdown go install $(BENCH) @date - bench web.code.counter nmake 1 + # bench web.code.counter nmake 1 install_all: install touch etc/local.shy diff --git a/src/contexts/cli/cli_linux.go b/src/contexts/cli/cli_linux.go index edd34a59..0c3edfa8 100644 --- a/src/contexts/cli/cli_linux.go +++ b/src/contexts/cli/cli_linux.go @@ -19,8 +19,8 @@ func sysinfo(m *ctx.Message, c *ctx.Context, key string, arg ...string) { m.Append("uptime", d) m.Append("procs", sys.Procs) - m.Append("total", kit.FmtSize(sys.Totalram)) - m.Append("free", kit.FmtSize(sys.Freeram)) + m.Append("total", kit.FmtSize(uint64(sys.Totalram))) + m.Append("free", kit.FmtSize(uint64(sys.Freeram))) m.Append("mper", fmt.Sprintf("%d%%", sys.Freeram*100/sys.Totalram)) fs := &syscall.Statfs_t{} diff --git a/src/contexts/web/web.go b/src/contexts/web/web.go index 10f127ea..970d19b8 100644 --- a/src/contexts/web/web.go +++ b/src/contexts/web/web.go @@ -725,7 +725,7 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心", login = m.Spawn().Cmd("session").Appendv("login").(*ctx.Message) } if login != nil { - http.SetCookie(w, &http.Cookie{Name: "sessid", Value: login.Cap("sessid")}) + http.SetCookie(w, &http.Cookie{Name: "sessid", Value: login.Cap("sessid"), Path: "/"}) } if !right && login != nil { diff --git a/usr/librarys/code.js b/usr/librarys/code.js index 5ce353d2..09cc42c0 100644 --- a/usr/librarys/code.js +++ b/usr/librarys/code.js @@ -108,11 +108,7 @@ function onaction(event, action) { } break case "command": - send_command(event.target.form, function() { - if (event.target.value == "login") { - location.reload() - } - }) + send_command(event.target.form, function() {}) break case "input": switch (event.key) {