aboutsummaryrefslogtreecommitdiff
path: root/weed
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-23 12:14:51 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-23 12:14:51 -0800
commitdb62090f88b6af9d44c7a92f8ccb075e93b3d9a3 (patch)
treefa62b3e76cd7a9c9ac884c90b1622b737d28d307 /weed
parent1c7e1295dc4c91ab55920af9082498b55bdc3e66 (diff)
downloadseaweedfs-db62090f88b6af9d44c7a92f8ccb075e93b3d9a3.tar.xz
seaweedfs-db62090f88b6af9d44c7a92f8ccb075e93b3d9a3.zip
s3: break loop if error
fix https://github.com/chrislusf/seaweedfs/issues/1701
Diffstat (limited to 'weed')
-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)