diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-12-23 12:14:51 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-12-23 12:14:51 -0800 |
| commit | db62090f88b6af9d44c7a92f8ccb075e93b3d9a3 (patch) | |
| tree | fa62b3e76cd7a9c9ac884c90b1622b737d28d307 /weed | |
| parent | 1c7e1295dc4c91ab55920af9082498b55bdc3e66 (diff) | |
| download | seaweedfs-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.go | 2 |
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) |
