Do not return S3 empty directories in recursive listing (#1846)

This commit is contained in:
Anis Elleuch
2016-10-01 21:32:22 -07:00
committed by Harshavardhana
parent 5b94ddc703
commit f54e426bb1
+4
View File
@@ -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.