Repair LFS web rendering. (#22195)

There was just a missing check.

Fixes #22193.

Signed-off-by: Nick Guenther <nick.guenther@polymtl.ca>
This commit is contained in:
Nick 2022-12-20 20:21:26 -05:00 committed by GitHub
parent 70d15e7785
commit c4df10d219
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -272,7 +272,7 @@ func getFileReader(repoID int64, blob *git.Blob) ([]byte, io.ReadCloser, *fileIn
} }
meta, err := git_model.GetLFSMetaObjectByOid(repoID, pointer.Oid) 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 return buf, dataRc, &fileInfo{isTextFile, false, blob.Size(), nil, st}, nil
} }