Skip to content

Commit

Permalink
fix: path
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxsen committed Jan 14, 2024
1 parent 0abcf2f commit 1ad7b96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/bot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ func (c *TGBot) storePartInfo(ctxFile string, partid int, partkey string, partsi
}

func (c *TGBot) buildContextFile(filekey string) string {
return fmt.Sprintf("%s%s%s", c.tmpDir(), string(filepath.Separator), filekey)
enc := utils.GetMd5([]byte(filekey)) //避免外部传入异常路径
return fmt.Sprintf("%s%s%s", c.tmpDir(), string(filepath.Separator), enc)
}

func (c *TGBot) PartFileUpload(ctx context.Context, pctx *core.PartFileUploadRequest) (*core.PartFileUploadResponse, error) {
Expand Down

0 comments on commit 1ad7b96

Please sign in to comment.