Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
rroy233 committed Jul 8, 2024
1 parent ebc58d8 commit 9af7466
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion db/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ func CacheSticker(sticker tgbotapi.Sticker, convertedFilePath string) (*StickerI
item.FileExt = utils.GetFileExtName(convertedFilePath)
item.SavePath = fmt.Sprintf("%s/%d_%s.%s", cacheDir, item.SaveTimeStamp, utils.MD5(sticker.FileUniqueID), item.FileExt)

stat, _ := os.Stat(convertedFilePath)
stat, err := os.Stat(convertedFilePath)
if err != nil {
return nil, errors.New("os.Stat(convertedFilePath) error:" + err.Error())
}
item.Size = stat.Size()

fileMd5, err := utils.MD5File(convertedFilePath)
Expand Down

0 comments on commit 9af7466

Please sign in to comment.