1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 10:10:53 +00:00

make .beego dir if don`t exist

This commit is contained in:
wangle 2020-08-10 22:46:29 +08:00
parent f0815cc9b2
commit 413f4ef129

View File

@ -481,6 +481,12 @@ func NoticeUpdateBee() {
return return
} }
beeHome := system.BeegoHome beeHome := system.BeegoHome
if !IsExist(beeHome) {
if err := os.MkdirAll(beeHome, 0755); err != nil {
beeLogger.Log.Fatalf("Could not create the directory: %s", err)
return
}
}
fp := beeHome + "/.noticeUpdateBee" fp := beeHome + "/.noticeUpdateBee"
timeNow := time.Now().Unix() timeNow := time.Now().Unix()
var timeOld int64 var timeOld int64