From 454f6a26627bc09c3652b928da26b9af9f87d471 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Thu, 9 Mar 2017 23:57:30 +0100 Subject: [PATCH] vendor: Update minio-go to bring #620 fix https://github.com/minio/minio-go/pull/620 --- vendor/github.com/minio/minio-go/api-put-object-common.go | 2 +- .../github.com/minio/minio-go/api-put-object-multipart.go | 2 +- vendor/github.com/minio/minio-go/api-put-object.go | 8 ++++---- vendor/vendor.json | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vendor/github.com/minio/minio-go/api-put-object-common.go b/vendor/github.com/minio/minio-go/api-put-object-common.go index 3384d7b2d4..5f5f568e6f 100644 --- a/vendor/github.com/minio/minio-go/api-put-object-common.go +++ b/vendor/github.com/minio/minio-go/api-put-object-common.go @@ -161,7 +161,7 @@ func hashCopyN(hashAlgorithms map[string]hash.Hash, hashSums map[string][]byte, for k, v := range hashAlgorithms { hashSums[k] = v.Sum(nil) } - return size, nil + return size, err } // getUploadID - fetch upload id if already present for an object name diff --git a/vendor/github.com/minio/minio-go/api-put-object-multipart.go b/vendor/github.com/minio/minio-go/api-put-object-multipart.go index e292203654..a62d4075da 100644 --- a/vendor/github.com/minio/minio-go/api-put-object-multipart.go +++ b/vendor/github.com/minio/minio-go/api-put-object-multipart.go @@ -113,7 +113,7 @@ func (c Client) putObjectMultipartStream(bucketName, objectName string, reader i // Calculates hash sums while copying partSize bytes into tmpBuffer. prtSize, rErr := hashCopyN(hashAlgos, hashSums, tmpBuffer, reader, partSize) - if rErr != nil { + if rErr != nil && rErr != io.EOF { return 0, rErr } diff --git a/vendor/github.com/minio/minio-go/api-put-object.go b/vendor/github.com/minio/minio-go/api-put-object.go index 4a6781b658..ac974ac9ac 100644 --- a/vendor/github.com/minio/minio-go/api-put-object.go +++ b/vendor/github.com/minio/minio-go/api-put-object.go @@ -209,9 +209,6 @@ func (c Client) putObjectSingle(bucketName, objectName string, reader io.Reader, // Initialize a new temporary buffer. tmpBuffer := new(bytes.Buffer) size, err = hashCopyN(hashAlgos, hashSums, tmpBuffer, reader, size) - if err != nil { - return 0, err - } reader = bytes.NewReader(tmpBuffer.Bytes()) tmpBuffer.Reset() } else { @@ -232,7 +229,10 @@ func (c Client) putObjectSingle(bucketName, objectName string, reader io.Reader, } reader = tmpFile } - + // Return error if its not io.EOF. + if err != nil && err != io.EOF { + return 0, err + } // Execute put object. st, err := c.putObjectDo(bucketName, objectName, reader, hashSums["md5"], hashSums["sha256"], size, metaData) if err != nil { diff --git a/vendor/vendor.json b/vendor/vendor.json index 55b946c6c1..2c2bc9938e 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -50,10 +50,10 @@ "revisionTime": "2015-10-24T22:24:27-07:00" }, { - "checksumSHA1": "rLcqRbRw+5GWQnL9fuvvVvlMCjo=", + "checksumSHA1": "Fiq9YtYWpvBgakNfkbNODV/ecsA=", "path": "github.com/minio/minio-go", - "revision": "d64c0f6ad35d282c21af6f3d735d07ce7ac579e3", - "revisionTime": "2017-03-09T20:51:21Z" + "revision": "23b2696b235aac3007ee050e3ac6765c19136a38", + "revisionTime": "2017-03-09T22:38:31Z" }, { "checksumSHA1": "qTxOBp3GVxCC70ykb7Hxg6UgWwA=",