diff --git a/registry/storage/driver/gcs/gcs.go b/registry/storage/driver/gcs/gcs.go index abe0b9f6..ad5f9bd6 100644 --- a/registry/storage/driver/gcs/gcs.go +++ b/registry/storage/driver/gcs/gcs.go @@ -493,6 +493,9 @@ func (w *writer) Write(p []byte) (int, error) { // Size returns the number of bytes written to this FileWriter. func (w *writer) Size() int64 { + if !w.closed { + return w.size + int64(w.buffSize) + } return w.size }