diff options
| author | chrislu <chris.lu@gmail.com> | 2022-08-03 00:10:47 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-08-03 00:10:47 -0700 |
| commit | 90db4b5a44a3fcb70209a116789844acefed1d28 (patch) | |
| tree | 76fe3a1a8b8e9be6230cbee48ad2fc254d42fd05 | |
| parent | 8a61c124c731b5cc484d52b46ae2259c010d21fa (diff) | |
| download | seaweedfs-90db4b5a44a3fcb70209a116789844acefed1d28.tar.xz seaweedfs-90db4b5a44a3fcb70209a116789844acefed1d28.zip | |
minor
| -rw-r--r-- | weed/s3api/s3api_objects_list_handlers.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/s3api/s3api_objects_list_handlers.go b/weed/s3api/s3api_objects_list_handlers.go index 15d4cece6..448b082eb 100644 --- a/weed/s3api/s3api_objects_list_handlers.go +++ b/weed/s3api/s3api_objects_list_handlers.go @@ -338,7 +338,7 @@ func (s3a *S3ApiServer) doListFilerEntries(client filer_pb.SeaweedFilerClient, d } else if delimiter == "/" { var isEmpty bool if !s3a.option.AllowEmptyFolder && !entry.IsDirectoryKeyObject() { - if isEmpty, err = s3a.isDirectoryAllEmpty(client, dir, entry.Name); err != nil { + if isEmpty, err = s3a.ensureDirectoryAllEmpty(client, dir, entry.Name); err != nil { glog.Errorf("check empty folder %s: %v", dir, err) } } @@ -383,8 +383,8 @@ func getListObjectsV1Args(values url.Values) (prefix, marker, delimiter string, return } -func (s3a *S3ApiServer) isDirectoryAllEmpty(filerClient filer_pb.SeaweedFilerClient, parentDir, name string) (isEmpty bool, err error) { - // println("+ isDirectoryAllEmpty", dir, name) +func (s3a *S3ApiServer) ensureDirectoryAllEmpty(filerClient filer_pb.SeaweedFilerClient, parentDir, name string) (isEmpty bool, err error) { + // println("+ ensureDirectoryAllEmpty", dir, name) glog.V(4).Infof("+ isEmpty %s/%s", parentDir, name) defer glog.V(4).Infof("- isEmpty %s/%s %v", parentDir, name, isEmpty) var fileCounter int @@ -420,7 +420,7 @@ func (s3a *S3ApiServer) isDirectoryAllEmpty(filerClient filer_pb.SeaweedFilerCli } for _, subDir := range subDirs { - isSubEmpty, subErr := s3a.isDirectoryAllEmpty(filerClient, currentDir, subDir) + isSubEmpty, subErr := s3a.ensureDirectoryAllEmpty(filerClient, currentDir, subDir) if subErr != nil { return false, subErr } |
