Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
修复批量下载时文件拓展名错误的bug
  • Loading branch information
rroy233 committed Mar 5, 2023
1 parent 75b72fc commit 394fdd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handler/DownloadStickerSetQuery.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func downloadWorker(ctx context.Context, queue chan tgbotapi.Sticker, task *down
cacheTmpFile, err := db.FindStickerCache(sticker.FileUniqueID)
if err == nil {
//命中缓存
err := utils.CopyFile(cacheTmpFile, fmt.Sprintf("%s/%s.gif", task.folderName, sticker.FileUniqueID))
err := utils.CopyFile(cacheTmpFile, fmt.Sprintf("%s/%s.%s", task.folderName, sticker.FileUniqueID, utils.GetFileExtName(cacheTmpFile)))
utils.RemoveFile(cacheTmpFile)
if err != nil {
logger.Error.Printf("DownloadStickerSetQuery[%d/%d]-failed to copy:%s", i, sum, err.Error())
Expand Down

0 comments on commit 394fdd8

Please sign in to comment.