aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/download.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/download.go')
-rw-r--r--routers/repo/download.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/repo/download.go b/routers/repo/download.go
index 50f893690b..63a9ca47d7 100644
--- a/routers/repo/download.go
+++ b/routers/repo/download.go
@@ -96,12 +96,13 @@ func ServeBlobOrLFS(ctx *context.Context, blob *git.Blob) error {
}
}()
- if meta, _ := lfs.ReadPointerFile(dataRc); meta != nil {
- meta, _ = ctx.Repo.Repository.GetLFSMetaObjectByOid(meta.Oid)
+ pointer, _ := lfs.ReadPointer(dataRc)
+ if pointer.IsValid() {
+ meta, _ := ctx.Repo.Repository.GetLFSMetaObjectByOid(pointer.Oid)
if meta == nil {
return ServeBlob(ctx, blob)
}
- lfsDataRc, err := lfs.ReadMetaObject(meta)
+ lfsDataRc, err := lfs.ReadMetaObject(meta.Pointer)
if err != nil {
return err
}