Do not return S3 empty directories in recursive listing (#1846)
This commit is contained in:
committed by
Harshavardhana
parent
5b94ddc703
commit
f54e426bb1
@@ -1065,6 +1065,10 @@ func (c *s3Client) listRecursiveInRoutine(contentCh chan *clientContent) {
|
||||
}
|
||||
continue
|
||||
}
|
||||
// Ignore S3 empty directories
|
||||
if object.Size == 0 && strings.HasSuffix(object.Key, "/") {
|
||||
continue
|
||||
}
|
||||
content := &clientContent{}
|
||||
url := *c.targetURL
|
||||
// Join bucket and incoming object key.
|
||||
|
||||
Reference in New Issue
Block a user