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

Merge pull request #718 from wangle201210/develop

make .beego dir if don`t exist
This commit is contained in:
askuy 2020-09-07 14:43:08 +08:00 committed by GitHub
commit 8b942b1f22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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