diff --git a/pkg/object/object_storage.go b/pkg/object/object_storage.go index 6cb1a2156ade..8c6da3a9ec8e 100644 --- a/pkg/object/object_storage.go +++ b/pkg/object/object_storage.go @@ -321,8 +321,10 @@ func ListV2(store ObjectStorage, prefix, start, token, delimiter string, limit i if errors.Is(err, notSupported) { objs, err = store.List(prefix, start, delimiter, limit, followLink) if len(objs) != 0 { - hasMore = true nextToken = objs[len(objs)-1].Key() + if nextToken != "" { + hasMore = true + } } } return objs, hasMore, nextToken, err