Skip to content

Commit 1be63d2

Browse files
committed
fix
1 parent 14354e4 commit 1be63d2

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

routers/web/repo/view.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -713,14 +713,7 @@ func checkCitationFile(ctx *context.Context, entry *git.TreeEntry) {
713713
if entry.Name() == "CITATION.cff" || entry.Name() == "CITATION.bib" {
714714
ctx.Data["CitiationExist"] = true
715715
// Read Citation file contents
716-
blob := entry.Blob()
717-
dataRc, err := blob.DataAsync()
718-
if err != nil {
719-
ctx.ServerError("DataAsync", err)
720-
return
721-
}
722-
defer dataRc.Close()
723-
ctx.PageData["citationFileContent"], err = blob.GetBlobContent(setting.UI.MaxDisplayFileSize)
716+
ctx.PageData["citationFileContent"], err = entry.Blob().GetBlobContent(setting.UI.MaxDisplayFileSize)
724717
if err != nil {
725718
ctx.ServerError("GetBlobContent", err)
726719
return

0 commit comments

Comments
 (0)