GCS: FileWriter.Size: return offset + buffer size for Writers that are not closed
Signed-off-by: Arthur Baars <arthur@semmle.com>
This commit is contained in:
parent
1e0f3b7b64
commit
431e46a7f9
1 changed files with 1 additions and 1 deletions
|
@ -494,7 +494,7 @@ 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 {
|
if !w.closed {
|
||||||
return w.size + int64(w.buffSize)
|
return w.offset + int64(w.buffSize)
|
||||||
}
|
}
|
||||||
return w.size
|
return w.size
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue