aboutsummaryrefslogtreecommitdiffstats
path: root/services/packages
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-01-18 23:52:04 +0800
committerGitHub <noreply@github.com>2023-01-18 09:52:04 -0600
commitf59ce777728cf84ccdf711491772104a0fc0dd6e (patch)
treeb77b85f70a9b53decf87db3b7414736fd49b0234 /services/packages
parent7ddc11def7e524df194cd67a93cf83cf733b1b79 (diff)
downloadgitea-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.go4
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 {