Skip to content

Commit

Permalink
List all file versions when deleting recursively on B2
Browse files Browse the repository at this point in the history
  • Loading branch information
hifi committed Dec 18, 2023
1 parent 1bcd907 commit 5fb407c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions b2/replica_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (c *ReplicaClient) DeleteGeneration(ctx context.Context, generation string)

// Collect all files for the generation.
var objs []*b2.Object
iter := c.BucketClient.List(ctx, b2.ListPrefix(dir+"/"), b2.ListDelimiter(""))
iter := c.BucketClient.List(ctx, b2.ListPrefix(dir+"/"), b2.ListDelimiter(""), b2.ListHidden())
for iter.Next() {
objs = append(objs, iter.Object())
}
Expand Down Expand Up @@ -336,7 +336,7 @@ func (c *ReplicaClient) DeleteAll(ctx context.Context) error {

// Collect all files for the generation.
var objs []*b2.Object
iter := c.BucketClient.List(ctx, b2.ListPrefix(prefix), b2.ListDelimiter(""))
iter := c.BucketClient.List(ctx, b2.ListPrefix(prefix), b2.ListDelimiter(""), b2.ListHidden())
for iter.Next() {
obj := iter.Object()
objs = append(objs, obj)
Expand Down

0 comments on commit 5fb407c

Please sign in to comment.