diff --git a/registry/storage/driver/gcs/gcs.go b/registry/storage/driver/gcs/gcs.go index ad5f9bd6..2aad7faa 100644 --- a/registry/storage/driver/gcs/gcs.go +++ b/registry/storage/driver/gcs/gcs.go @@ -494,7 +494,7 @@ 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.offset + int64(w.buffSize) } return w.size }