1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-02 15:16:51 +02:00

s3: break loop if error

fix #1701
This commit is contained in:
Chris Lu 2020-12-23 14:34:59 -08:00
parent dc19bc2ace
commit 0ca9d89589

View file

@ -315,7 +315,7 @@ func (s3a *S3ApiServer) isDirectoryAllEmpty(filerClient filer_pb.SeaweedFilerCli
currentDir := parentDir + "/" + name
var startFrom string
var isExhausted bool
for fileCounter == 0 && !isExhausted {
for fileCounter == 0 && !isExhausted && err == nil {
err = filer_pb.SeaweedList(filerClient, currentDir, "", func(entry *filer_pb.Entry, isLast bool) error {
if entry.IsDirectory {
subDirs = append(subDirs, entry.Name)