Browse Source

fix: 解决部分情况下缓存目录导致启动失败的问题 (#6364)

Refs https://github.com/1Panel-dev/1Panel/issues/6362
pull/6370/head
zhengkunwang 3 months ago committed by GitHub
parent
commit
a397cab61c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      backend/init/cache/cache.go

4
backend/init/cache/cache.go vendored

@ -1,6 +1,7 @@
package cache
import (
"os"
"time"
"github.com/1Panel-dev/1Panel/backend/global"
@ -10,7 +11,8 @@ import (
func Init() {
c := global.CONF.System.Cache
_ = os.RemoveAll(c)
_ = os.Mkdir(c, 0644)
options := badger.Options{
Dir: c,
ValueDir: c,

Loading…
Cancel
Save