Skip to content

Commit 23b972b

Browse files
committed
fix(pig): asset key
1 parent 26b8455 commit 23b972b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugin/pig/pig.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"errors"
77
"fmt"
88
"math/rand"
9-
"path/filepath"
109
"strings"
1110
"sync"
1211
"time"
@@ -197,8 +196,7 @@ func (img *pigImage) fetch() ([]byte, error) {
197196
return nil, errors.New("图片数据异常,缺少文件名")
198197
}
199198

200-
targetPath := filepath.Join("assets", img.Filename)
201-
199+
targetPath := "assets/" + img.Filename
202200
imgData, err := engine.GetLazyData(targetPath, true)
203201
if err != nil {
204202
return nil, errors.New("图片资源缺失 (" + targetPath + "): " + err.Error())

0 commit comments

Comments
 (0)