fixed last chunk
This commit is contained in:
parent
70414c4941
commit
4f043d228d
1 changed files with 3 additions and 0 deletions
|
|
@ -199,6 +199,9 @@ func (f *file) WriteAt(data []byte, pos int64) (n int, err error) {
|
||||||
w, e := c.writeAt(data[n:], woff)
|
w, e := c.writeAt(data[n:], woff)
|
||||||
n += w
|
n += w
|
||||||
if c.full() {
|
if c.full() {
|
||||||
|
if f.w.last.cn == cn {
|
||||||
|
f.w.last = nil
|
||||||
|
}
|
||||||
// async flush
|
// async flush
|
||||||
go func() {
|
go func() {
|
||||||
c.flush(notLastChunk)
|
c.flush(notLastChunk)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue