Skip to content

Commit

Permalink
fix: 解决部分情况下缓存目录导致启动失败的问题 (#6364)
Browse files Browse the repository at this point in the history
Refs #6362
  • Loading branch information
zhengkunwang223 committed Sep 4, 2024
1 parent 228e3d9 commit a397cab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/init/cache/cache.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cache

import (
"os"
"time"

"github.com/1Panel-dev/1Panel/backend/global"
Expand All @@ -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,
Expand Down

0 comments on commit a397cab

Please sign in to comment.