aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/dump.go
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 /cmd/dump.go
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 'cmd/dump.go')
-rw-r--r--cmd/dump.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/dump.go b/cmd/dump.go
index c802849f8e..00d279b991 100644
--- a/cmd/dump.go
+++ b/cmd/dump.go
@@ -250,7 +250,7 @@ func runDump(ctx *cli.Context) error {
if ctx.IsSet("skip-lfs-data") && ctx.Bool("skip-lfs-data") {
log.Info("Skip dumping LFS data")
- } else if err := storage.LFS.IterateObjects(func(objPath string, object storage.Object) error {
+ } else if err := storage.LFS.IterateObjects("", func(objPath string, object storage.Object) error {
info, err := object.Stat()
if err != nil {
return err
@@ -351,7 +351,7 @@ func runDump(ctx *cli.Context) error {
if ctx.IsSet("skip-attachment-data") && ctx.Bool("skip-attachment-data") {
log.Info("Skip dumping attachment data")
- } else if err := storage.Attachments.IterateObjects(func(objPath string, object storage.Object) error {
+ } else if err := storage.Attachments.IterateObjects("", func(objPath string, object storage.Object) error {
info, err := object.Stat()
if err != nil {
return err
@@ -364,7 +364,7 @@ func runDump(ctx *cli.Context) error {
if ctx.IsSet("skip-package-data") && ctx.Bool("skip-package-data") {
log.Info("Skip dumping package data")
- } else if err := storage.Packages.IterateObjects(func(objPath string, object storage.Object) error {
+ } else if err := storage.Packages.IterateObjects("", func(objPath string, object storage.Object) error {
info, err := object.Stat()
if err != nil {
return err