Skip to content

Commit c4df10d

Browse files
authored
Repair LFS web rendering. (#22195)
There was just a missing check. Fixes #22193. Signed-off-by: Nick Guenther <[email protected]>
1 parent 70d15e7 commit c4df10d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/repo/view.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ func getFileReader(repoID int64, blob *git.Blob) ([]byte, io.ReadCloser, *fileIn
272272
}
273273

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

0 commit comments

Comments
 (0)