aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorNick <nick@kousu.ca>2022-12-20 20:21:26 -0500
committerGitHub <noreply@github.com>2022-12-21 09:21:26 +0800
commitc4df10d219adf25203ba53baf3d6ccbad15362ec (patch)
tree948128669f0bffbf9e537b5cab25b24a65899313 /routers
parent70d15e77851a437384de018ffebcf4fb3c5af789 (diff)
downloadgitea-c4df10d219adf25203ba53baf3d6ccbad15362ec.tar.gz
gitea-c4df10d219adf25203ba53baf3d6ccbad15362ec.zip
Repair LFS web rendering. (#22195)
There was just a missing check. Fixes #22193. Signed-off-by: Nick Guenther <nick.guenther@polymtl.ca>
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/view.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index 3e3a4efc31..915944e4d5 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
}