Skip to content

Commit

Permalink
fixed ListBucket iterator to always break on seek/forward error
Browse files Browse the repository at this point in the history
  • Loading branch information
ganigeorgiev committed Jan 12, 2023
1 parent a8b2f0f commit f792a9e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tools/filesystem/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,11 @@ func (s *System) DeletePrefix(prefix string) []error {
})
for {
obj, err := iter.Next(s.ctx)
if err == io.EOF {
break
}

if err != nil {
failed = append(failed, err)
continue
if err != io.EOF {
failed = append(failed, err)
}
break
}

if err := s.Delete(obj.Key); err != nil {
Expand Down

0 comments on commit f792a9e

Please sign in to comment.