segments: send in the object path to the initial CreateSegment… (#2518)
otherwise, api key restictions will fail because we look like we're asking to put to the bucket metadata path.
This commit is contained in:
parent
7886a4d7b9
commit
10547cc1ea
@ -128,13 +128,13 @@ func (s *segmentStore) Put(ctx context.Context, data io.Reader, expiration time.
|
||||
if err != nil {
|
||||
return Meta{}, Error.Wrap(err)
|
||||
}
|
||||
bucket, _, _, err := splitPathFragments(p)
|
||||
bucket, objectPath, _, err := splitPathFragments(p)
|
||||
if err != nil {
|
||||
return Meta{}, err
|
||||
}
|
||||
|
||||
// path and segment index are not known at this point
|
||||
limits, rootPieceID, err := s.metainfo.CreateSegment(ctx, bucket, "", -1, redundancy, s.maxEncryptedSegmentSize, expiration)
|
||||
limits, rootPieceID, err := s.metainfo.CreateSegment(ctx, bucket, objectPath, -1, redundancy, s.maxEncryptedSegmentSize, expiration)
|
||||
if err != nil {
|
||||
return Meta{}, Error.Wrap(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user