Merge pull request #1703 from aibaars/gcs-fix
GCS: FileWriter.Size: include number of buffered bytes if the FileWriter is not closed
This commit is contained in:
commit
1e0f3b7b64
1 changed files with 3 additions and 0 deletions
|
@ -493,6 +493,9 @@ func (w *writer) Write(p []byte) (int, error) {
|
||||||
|
|
||||||
// Size returns the number of bytes written to this FileWriter.
|
// Size returns the number of bytes written to this FileWriter.
|
||||||
func (w *writer) Size() int64 {
|
func (w *writer) Size() int64 {
|
||||||
|
if !w.closed {
|
||||||
|
return w.size + int64(w.buffSize)
|
||||||
|
}
|
||||||
return w.size
|
return w.size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue