Skip to content

Commit

Permalink
Dont return in loop. (#1589)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav committed Aug 1, 2023
1 parent 69021f5 commit 78d0665
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/sources/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,19 +229,19 @@ func (s *Source) pageChunker(ctx context.Context, client *s3.S3, chunksChan chan
// ignore large files
if *obj.Size > s.maxObjectSize {
s.log.V(3).Info("Skipping %d byte file (over maxObjectSize limit)", "object", *obj.Key)
return
continue
}

// file empty file
if *obj.Size == 0 {
s.log.V(5).Info("Skipping 0 byte file", "object", *obj.Key)
return
continue
}

// skip incompatible extensions
if common.SkipFile(*obj.Key) {
s.log.V(5).Info("Skipping file with incompatible extension", "object", *obj.Key)
return
continue
}

s.jobPool.Go(func() error {
Expand Down

0 comments on commit 78d0665

Please sign in to comment.