Failing WriteAt should return ErrShortWrite
See the implementation of io.Copy.
This commit is contained in:
parent
7bc8524d24
commit
381c6bef68
|
@ -56,7 +56,7 @@ func (me MMapSpan) WriteAt(p []byte, off int64) (n int, err error) {
|
||||||
return len(p) == 0
|
return len(p) == 0
|
||||||
})
|
})
|
||||||
if len(p) != 0 {
|
if len(p) != 0 {
|
||||||
err = io.EOF
|
err = io.ErrShortWrite
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue