Skip to content

Commit

Permalink
Merge pull request #3127 from dmage/err-shadow
Browse files Browse the repository at this point in the history
Fix err shadowing in gcs driver
  • Loading branch information
dmcgowan committed Mar 19, 2020
2 parents 17a394f + cdb4ba9 commit 742aab9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion registry/storage/driver/gcs/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ func putContentsClose(wc *storage.Writer, contents []byte) error {
var nn int
var err error
for nn < size {
n, err := wc.Write(contents[nn:size])
var n int
n, err = wc.Write(contents[nn:size])
nn += n
if err != nil {
break
Expand Down

0 comments on commit 742aab9

Please sign in to comment.