2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 20:57:19 +08:00

fix(toolbox): kb

This commit is contained in:
耗子
2023-08-17 11:53:34 +08:00
parent 514baf4fb3
commit 67ff105cba

View File

@@ -109,7 +109,7 @@ func (c *ToolBoxController) SetSWAP(ctx http.Context) {
if size > 1 {
free := tools.Exec("df -k /www | awk '{print $4}' | tail -n 1")
if cast.ToInt64(free) < int64(size)*1024*1024 {
if cast.ToInt64(free)*1024 < int64(size)*1024*1024 {
controllers.Error(ctx, http.StatusBadRequest, "磁盘空间不足,当前剩余 "+tools.FormatBytes(cast.ToFloat64(free)))
return
}