Skip to content

Commit

Permalink
Fix bug with lister after struct and method refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Van Buren authored and Seth Van Buren committed May 24, 2019
1 parent 9cfc6d6 commit f07b033
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions list.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ func (lister *BucketLister) listObjectVersions(exactMatch bool) {
listVersionsInput.Prefix = aws.String(lister.source.Path[1:])
}

var wg sync.WaitGroup

var numObjects int64 = 0

var exactMatchKey string
Expand All @@ -103,13 +101,13 @@ func (lister *BucketLister) listObjectVersions(exactMatch bool) {
numObjects = numObjects + int64(len(result.Versions)+len(result.DeleteMarkers))

if numObjects > 0 {
wg.Add(1)
lister.wg.Add(1)
go processListObjectsVersionsOutputFunc(result.Versions, result.DeleteMarkers)
} //if
return true
})

wg.Wait()
lister.wg.Wait()

if err != nil {
if aerr, ok := err.(awserr.Error); ok {
Expand Down

0 comments on commit f07b033

Please sign in to comment.