diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index 3e3a4efc3..915944e4d 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -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 }