aboutsummaryrefslogtreecommitdiffstats
path: root/modules/doctor
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@vip.qq.com>2023-03-13 18:23:51 +0800
committerGitHub <noreply@github.com>2023-03-13 18:23:51 +0800
commitcdc9e91750036fc370db65a44618f3139db11ae1 (patch)
tree8a7ae4158086eb157d8aaa5689ff164c8b2d4d78 /modules/doctor
parent757b4c17e900f1d11a81bc9467d90e6c245ee8f2 (diff)
downloadgitea-cdc9e91750036fc370db65a44618f3139db11ae1.tar.gz
gitea-cdc9e91750036fc370db65a44618f3139db11ae1.zip
add path prefix to ObjectStorage.Iterator (#23332)
Support to iterator subdirectory in ObjectStorage for ObjectStorage.Iterator method. It's required for https://github.com/go-gitea/gitea/pull/22738 to make artifact files cleanable. --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/doctor')
-rw-r--r--modules/doctor/storage.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/doctor/storage.go b/modules/doctor/storage.go
index aa987de447..c20566d675 100644
--- a/modules/doctor/storage.go
+++ b/modules/doctor/storage.go
@@ -31,7 +31,7 @@ func commonCheckStorage(ctx context.Context, logger log.Logger, autofix bool, op
totalSize, orphanedSize := int64(0), int64(0)
var pathsToDelete []string
- if err := opts.storer.IterateObjects(func(p string, obj storage.Object) error {
+ if err := opts.storer.IterateObjects("", func(p string, obj storage.Object) error {
defer obj.Close()
totalCount++