refactor(storage/s3): remove redundant len check (#4259)

This commit is contained in:
Milos Gajdos 2024-01-18 17:29:46 +07:00 committed by GitHub
commit 0b21cc06b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1128,7 +1128,6 @@ func (d *driver) doWalk(parentCtx context.Context, objectCount *int64, from stri
// get a list of all inferred directories between the previous directory and this file // get a list of all inferred directories between the previous directory and this file
dirs := directoryDiff(prevDir, filePath) dirs := directoryDiff(prevDir, filePath)
if len(dirs) > 0 {
for _, dir := range dirs { for _, dir := range dirs {
walkInfos = append(walkInfos, storagedriver.FileInfoInternal{ walkInfos = append(walkInfos, storagedriver.FileInfoInternal{
FileInfoFields: storagedriver.FileInfoFields{ FileInfoFields: storagedriver.FileInfoFields{
@ -1138,7 +1137,6 @@ func (d *driver) doWalk(parentCtx context.Context, objectCount *int64, from stri
}) })
prevDir = dir prevDir = dir
} }
}
walkInfos = append(walkInfos, storagedriver.FileInfoInternal{ walkInfos = append(walkInfos, storagedriver.FileInfoInternal{
FileInfoFields: storagedriver.FileInfoFields{ FileInfoFields: storagedriver.FileInfoFields{