diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-01-18 23:52:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 09:52:04 -0600 |
commit | f59ce777728cf84ccdf711491772104a0fc0dd6e (patch) | |
tree | b77b85f70a9b53decf87db3b7414736fd49b0234 /services/packages | |
parent | 7ddc11def7e524df194cd67a93cf83cf733b1b79 (diff) | |
download | gitea-f59ce777728cf84ccdf711491772104a0fc0dd6e.tar.gz gitea-f59ce777728cf84ccdf711491772104a0fc0dd6e.zip |
Display unreferenced packages total size in package admin panel (#22498)
Diffstat (limited to 'services/packages')
-rw-r--r-- | services/packages/packages.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/packages/packages.go b/services/packages/packages.go index 49f5a2fac4..410e73c048 100644 --- a/services/packages/packages.go +++ b/services/packages/packages.go @@ -361,11 +361,11 @@ func checkSizeQuotaExceeded(ctx context.Context, doer, owner *user_model.User, p } if setting.Packages.LimitTotalOwnerSize > -1 { - totalSize, err := packages_model.CalculateBlobSize(ctx, &packages_model.PackageFileSearchOptions{ + totalSize, err := packages_model.CalculateFileSize(ctx, &packages_model.PackageFileSearchOptions{ OwnerID: owner.ID, }) if err != nil { - log.Error("CalculateBlobSize failed: %v", err) + log.Error("CalculateFileSize failed: %v", err) return err } if totalSize+uploadSize > setting.Packages.LimitTotalOwnerSize { |