mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-01 15:55:15 +08:00
Display unreferenced packages total size in package admin panel (#22498)
This commit is contained in:
@ -199,9 +199,9 @@ func SearchFiles(ctx context.Context, opts *PackageFileSearchOptions) ([]*Packag
|
||||
return pfs, count, err
|
||||
}
|
||||
|
||||
// CalculateBlobSize sums up all blob sizes matching the search options.
|
||||
// CalculateFileSize sums up all blob sizes matching the search options.
|
||||
// It does NOT respect the deduplication of blobs.
|
||||
func CalculateBlobSize(ctx context.Context, opts *PackageFileSearchOptions) (int64, error) {
|
||||
func CalculateFileSize(ctx context.Context, opts *PackageFileSearchOptions) (int64, error) {
|
||||
return db.GetEngine(ctx).
|
||||
Table("package_file").
|
||||
Where(opts.toConds()).
|
||||
|
Reference in New Issue
Block a user