Skip to content

Commit

Permalink
Fixed reversed condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Erin Pentecost committed Oct 29, 2020
1 parent fb50c5d commit 076ddfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func (o *object) Open(accesslevel cloudstorage.AccessLevel) (*os.File, error) {
}
// make sure the whole object was downloaded from google
if contentLength, ok := o.metadata["content_length"]; ok {
if contentLengthInt, err := strconv.ParseInt(contentLength, 10, 64); err != nil {
if contentLengthInt, err := strconv.ParseInt(contentLength, 10, 64); err == nil {
if contentLengthInt != writtenBytes {
return nil, fmt.Errorf("partial file download error. tfile=%v", o.name)
}
Expand Down

0 comments on commit 076ddfd

Please sign in to comment.