From cd30d6df31e3ee12654e27a7fa764b7f46ee4188 Mon Sep 17 00:00:00 2001 From: fumiama Date: Sun, 23 Jan 2022 13:43:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20fortune?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_fortune/fortune.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_fortune/fortune.go b/plugin_fortune/fortune.go index 946a32ad..31710bc9 100644 --- a/plugin_fortune/fortune.go +++ b/plugin_fortune/fortune.go @@ -142,7 +142,7 @@ func init() { digest := md5.Sum(helper.StringToBytes(zipfile + strconv.Itoa(index) + title + text)) cachefile := cache + hex.EncodeToString(digest[:]) - m, err := imgpool.NewImage(ctx, cachefile, cachefile) + m, err := imgpool.NewImage(ctx, cachefile, file.BOTPATH+"/"+cachefile) if err != nil { logrus.Debugln("[fortune]", err) if file.IsNotExist(cachefile) { @@ -158,7 +158,7 @@ func init() { return } } - m, err = imgpool.NewImage(ctx, cachefile, cachefile) + m, err = imgpool.NewImage(ctx, cachefile, file.BOTPATH+"/"+cachefile) } if err != nil {