mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-08-22 01:30:43 +02:00
s: avoid possible completeMultipartUpload re-tries that can overwrite the uploaded file
This commit is contained in:
parent
fdb59d5968
commit
83012f543a
|
@ -57,8 +57,8 @@ func (s3a *S3ApiServer) completeMultipartUpload(input *s3.CompleteMultipartUploa
|
||||||
uploadDirectory := s3a.genUploadsFolder(*input.Bucket) + "/" + *input.UploadId
|
uploadDirectory := s3a.genUploadsFolder(*input.Bucket) + "/" + *input.UploadId
|
||||||
|
|
||||||
entries, err := s3a.list(uploadDirectory, "", "", false, 0)
|
entries, err := s3a.list(uploadDirectory, "", "", false, 0)
|
||||||
if err != nil {
|
if err != nil || len(entries) == 0 {
|
||||||
glog.Errorf("completeMultipartUpload %s %s error: %v", *input.Bucket, *input.UploadId, err)
|
glog.Errorf("completeMultipartUpload %s %s error: %v, entries:%d", *input.Bucket, *input.UploadId, err, len(entries))
|
||||||
return nil, ErrNoSuchUpload
|
return nil, ErrNoSuchUpload
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue