Skip to content

Commit

Permalink
Bump to version 2.0.1
Browse files Browse the repository at this point in the history
Fixes an important issue with computing MD5 and Sha256 during FPutObject.
  • Loading branch information
harshavardhana committed Jul 19, 2016
1 parent 90a23af commit 9f282f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions api-put-object-common.go
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"hash"
"io"
"io/ioutil"
"math"
"os"
)
Expand Down Expand Up @@ -201,9 +202,9 @@ func (c Client) getUploadID(bucketName, objectName, contentType string) (uploadI

// computeHash - Calculates hashes for an input read Seeker.
func computeHash(hashAlgorithms map[string]hash.Hash, hashSums map[string][]byte, reader io.ReadSeeker) (size int64, err error) {
var hashWriter io.Writer
hashWriter := ioutil.Discard
for _, v := range hashAlgorithms {
hashWriter = io.MultiWriter(v)
hashWriter = io.MultiWriter(hashWriter, v)
}

// If no buffer is provided, no need to allocate just use io.Copy.
Expand Down
2 changes: 1 addition & 1 deletion api.go
Expand Up @@ -73,7 +73,7 @@ type Client struct {
// Global constants.
const (
libraryName = "minio-go"
libraryVersion = "2.0.0"
libraryVersion = "2.0.1"
)

// User Agent should always following the below style.
Expand Down

0 comments on commit 9f282f7

Please sign in to comment.