diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-09-11 14:53:50 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-09-11 14:53:50 -0700 |
| commit | 3eda8d6dfcfb6107593613e51f7faf3b42ce92b1 (patch) | |
| tree | 6e1ad38e4be41b53453684ab2da98ff5e2170382 /weed/s3api/filer_util.go | |
| parent | ab201c2798a63eb71dea605960e78ff3898b7c92 (diff) | |
| download | seaweedfs-3eda8d6dfcfb6107593613e51f7faf3b42ce92b1.tar.xz seaweedfs-3eda8d6dfcfb6107593613e51f7faf3b42ce92b1.zip | |
s3: ListParts output xml format
fix https://github.com/chrislusf/seaweedfs/issues/1461
Diffstat (limited to 'weed/s3api/filer_util.go')
| -rw-r--r-- | weed/s3api/filer_util.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/weed/s3api/filer_util.go b/weed/s3api/filer_util.go index 7f49c320e..ebdbe8245 100644 --- a/weed/s3api/filer_util.go +++ b/weed/s3api/filer_util.go @@ -21,10 +21,13 @@ func (s3a *S3ApiServer) mkFile(parentDirectoryPath string, fileName string, chun } -func (s3a *S3ApiServer) list(parentDirectoryPath, prefix, startFrom string, inclusive bool, limit uint32) (entries []*filer_pb.Entry, err error) { +func (s3a *S3ApiServer) list(parentDirectoryPath, prefix, startFrom string, inclusive bool, limit uint32) (entries []*filer_pb.Entry, isLast bool, err error) { - err = filer_pb.List(s3a, parentDirectoryPath, prefix, func(entry *filer_pb.Entry, isLast bool) error { + err = filer_pb.List(s3a, parentDirectoryPath, prefix, func(entry *filer_pb.Entry, isLastEntry bool) error { entries = append(entries, entry) + if isLastEntry { + isLast = true + } return nil }, startFrom, inclusive, limit) |
