storagedriver/s3: Simplified conditional in Walk impl

This commit is contained in:
Collin Shoop
2021-06-24 17:47:54 -04:00
parent c83e9ae10a
commit 48e2373d5b

View File

@@ -1210,15 +1210,13 @@ func (d *driver) doWalk(parentCtx context.Context, objectCount *int64, path, pre
return false return false
} }
if walkDirectories { if walkInfo.IsDir() && walkDirectories {
if walkInfo.IsDir() {
if err := d.doWalk(ctx, objectCount, *walkInfo.prefix, prefix, walkDirectories, f); err != nil { if err := d.doWalk(ctx, objectCount, *walkInfo.prefix, prefix, walkDirectories, f); err != nil {
retError = err retError = err
return false return false
} }
} }
} }
}
return true return true
}) })