Clearer comment

Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
This commit is contained in:
James Hewitt 2023-08-18 16:04:46 +01:00
parent 3c8b280408
commit 6deeec4699
No known key found for this signature in database
GPG key ID: EA6C3C654B6193E4

View file

@ -46,9 +46,9 @@ func doWalkFallback(ctx context.Context, driver StorageDriver, from string, star
for _, child := range children {
// (@jamstah) This will still walk objects that are before the startAfterHint,
// but to avoid that we would need to cache top level folders to check if there
// are any children then call the WalkFn, which is extra overhead. As the
// hint is just a hint for performance reasons, its fine to walk the extra
// objects instead.
// are any valid children then call the WalkFn for the cached entries only if
// there are, which is extra overhead. Because the hint is just a hint for
// performance reasons, its fine to walk the extra objects instead.
if child < startAfterHint && !strings.HasPrefix(startAfterHint, child) {
continue
}