diff options
-rw-r--r-- | models/repo.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go index d31d262c8d..dceeeb89e9 100644 --- a/models/repo.go +++ b/models/repo.go @@ -806,6 +806,14 @@ func (repo *Repository) updateSize(e Engine) error { return fmt.Errorf("updateSize: %v", err) } + objs, err := repo.GetLFSMetaObjects(-1, 0) + if err != nil { + return fmt.Errorf("updateSize: GetLFSMetaObjects: %v", err) + } + for _, obj := range objs { + size += obj.Size + } + repo.Size = size _, err = e.ID(repo.ID).Cols("size").Update(repo) return err |