Skip to content

Commit

Permalink
Repair LFS web rendering.
Browse files Browse the repository at this point in the history
Fixup go-gitea#22042 (aka 1b32ed0).
Fixes go-gitea#22193.

Signed-off-by: Nick Guenther <nick.guenther@polymtl.ca>
  • Loading branch information
kousu committed Dec 21, 2022
1 parent 70d15e7 commit d565453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/web/repo/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func getFileReader(repoID int64, blob *git.Blob) ([]byte, io.ReadCloser, *fileIn
}

meta, err := git_model.GetLFSMetaObjectByOid(repoID, pointer.Oid)
if err != git_model.ErrLFSObjectNotExist { // fallback to plain file
if err != nil && err != git_model.ErrLFSObjectNotExist { // fallback to plain file
return buf, dataRc, &fileInfo{isTextFile, false, blob.Size(), nil, st}, nil
}

Expand Down

0 comments on commit d565453

Please sign in to comment.