encryption: Fix copy from encrypted multipart to single part (#6604)

CopyObject handler forgot to remove multipart encryption flag in metadata
when source is an encrypted multipart object and the target is also encrypted
but single part object.

This PR also simplifies the code to facilitate review.
This commit is contained in:
Anis Elleuch
2018-10-15 19:07:36 +01:00
committed by kannappanr
parent 3ef3fefd54
commit 5b3090dffc
4 changed files with 70 additions and 37 deletions
+4
View File
@@ -109,8 +109,12 @@ type ObjectInfo struct {
Writer io.WriteCloser `json:"-"`
Reader *hash.Reader `json:"-"`
metadataOnly bool
// Date and time when the object was last accessed.
AccTime time.Time
// backendType indicates which backend filled this structure
backendType BackendType
}
// ListPartsInfo - represents list of all parts.