forked from forgejo/forgejo
Do not double close reader (#29354)
Fixes #29346 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit 553d46e6f6a144905266d58315a2b0ff2e976380)
This commit is contained in:
parent
428008ac19
commit
64ef7d3658
2 changed files with 11 additions and 4 deletions
|
@ -183,9 +183,6 @@ func editFile(ctx *context.Context, isNewFile bool) {
|
|||
}
|
||||
|
||||
d, _ := io.ReadAll(dataRc)
|
||||
if err := dataRc.Close(); err != nil {
|
||||
log.Error("Error whilst closing blob data: %v", err)
|
||||
}
|
||||
|
||||
buf = append(buf, d...)
|
||||
if content, err := charset.ToUTF8(buf, charset.ConvertOpts{KeepBOM: true}); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue