aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-23 14:34:59 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-23 14:34:59 -0800
commit0ca9d89589f9cff770ccb4fd5d95f643c8c4f2c6 (patch)
treeef84f4ef8cc370a8f7de2aa43834926981188c23
parentdc19bc2ace82e124455a7401d8542898605d76cc (diff)
downloadseaweedfs-0ca9d89589f9cff770ccb4fd5d95f643c8c4f2c6.tar.xz
seaweedfs-0ca9d89589f9cff770ccb4fd5d95f643c8c4f2c6.zip
s3: break loop if error
fix #1701
-rw-r--r--weed/s3api/s3api_objects_list_handlers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/s3api/s3api_objects_list_handlers.go b/weed/s3api/s3api_objects_list_handlers.go
index dce2fd6b0..b674f87cd 100644
--- a/weed/s3api/s3api_objects_list_handlers.go
+++ b/weed/s3api/s3api_objects_list_handlers.go
@@ -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)