mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
gateway-gcs: Close the writer with error in case of any errors. (#5217)
fixes #5216
This commit is contained in:
parent
4393afb7e2
commit
bbd05a8f1c
@ -805,7 +805,7 @@ func (l *gcsGateway) PutObject(bucket string, key string, data *hash.Reader, met
|
||||
|
||||
if _, err := io.Copy(w, data); err != nil {
|
||||
// Close the object writer upon error.
|
||||
w.Close()
|
||||
w.CloseWithError(err)
|
||||
return ObjectInfo{}, gcsToObjectError(traceError(err), bucket, key)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user