mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
s3: recursively iterate all sub folders
fix https://github.com/chrislusf/seaweedfs/issues/1656
This commit is contained in:
parent
a9c619c270
commit
02a160c3fd
|
@ -197,11 +197,12 @@ func (s3a *S3ApiServer) doListFilerEntries(client filer_pb.SeaweedFilerClient, d
|
||||||
sepIndex := strings.Index(marker, "/")
|
sepIndex := strings.Index(marker, "/")
|
||||||
subDir, subMarker := marker[0:sepIndex], marker[sepIndex+1:]
|
subDir, subMarker := marker[0:sepIndex], marker[sepIndex+1:]
|
||||||
// println("doListFilerEntries dir", dir+"/"+subDir, "subMarker", subMarker, "maxKeys", maxKeys)
|
// println("doListFilerEntries dir", dir+"/"+subDir, "subMarker", subMarker, "maxKeys", maxKeys)
|
||||||
subCounter, _, subNextMarker, subErr := s3a.doListFilerEntries(client, dir+"/"+subDir, "", maxKeys, subMarker, delimiter, eachEntryFn)
|
subCounter, subIsTruncated, subNextMarker, subErr := s3a.doListFilerEntries(client, dir+"/"+subDir, "", maxKeys, subMarker, delimiter, eachEntryFn)
|
||||||
if subErr != nil {
|
if subErr != nil {
|
||||||
err = subErr
|
err = subErr
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
isTruncated = isTruncated || subIsTruncated
|
||||||
maxKeys -= subCounter
|
maxKeys -= subCounter
|
||||||
nextMarker = subDir + "/" + subNextMarker
|
nextMarker = subDir + "/" + subNextMarker
|
||||||
counter += subCounter
|
counter += subCounter
|
||||||
|
|
Loading…
Reference in a new issue