|
|
@ -158,8 +158,10 @@ func (s3a *S3ApiServer) listFilerEntries(bucket string, originalPrefix string, m |
|
|
|
|
|
|
|
// check filer
|
|
|
|
err = s3a.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error { |
|
|
|
|
|
|
|
for { |
|
|
|
empty := true |
|
|
|
nextMarker, doErr = s3a.doListFilerEntries(client, reqDir, prefix, cursor, marker, delimiter, false, func(dir string, entry *filer_pb.Entry) { |
|
|
|
empty = false |
|
|
|
if entry.IsDirectory { |
|
|
|
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
|
|
|
|
if delimiter == "/" { // A response can contain CommonPrefixes only if you specify a delimiter.
|
|
|
@ -204,12 +206,18 @@ func (s3a *S3ApiServer) listFilerEntries(bucket string, originalPrefix string, m |
|
|
|
return doErr |
|
|
|
} |
|
|
|
|
|
|
|
if !cursor.isTruncated { |
|
|
|
nextMarker = "" |
|
|
|
} else { |
|
|
|
if cursor.isTruncated { |
|
|
|
if requestDir != "" { |
|
|
|
nextMarker = requestDir + "/" + nextMarker |
|
|
|
} |
|
|
|
break |
|
|
|
} else if empty { |
|
|
|
nextMarker = "" |
|
|
|
break |
|
|
|
} else { |
|
|
|
// start next loop
|
|
|
|
marker = nextMarker |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
response = ListBucketResult{ |
|
|
|