优化GetLazyData

This commit is contained in:
源文雨
2022-05-05 13:31:22 +08:00
parent 17a8c10f8c
commit a8fba6e7b5
23 changed files with 46 additions and 74 deletions

View File

@@ -62,7 +62,7 @@ func init() { // 插件主体
getdb := ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool {
// 如果数据库不存在则下载
pool.db.DBPath = engine.DataFolder() + "SetuTime.db"
_, _ = fileutil.GetLazyData(pool.db.DBPath, false, false)
_, _ = engine.GetLazyData("SetuTime.db", false)
err := pool.db.Open()
if err != nil {
ctx.SendChain(message.Text("ERROR:", err))