storage file implementation: Error on short writes

This commit is contained in:
Matt Joiner 2020-06-01 11:12:33 +10:00
parent c3696aa5a4
commit 604af2be82
1 changed files with 3 additions and 3 deletions

View File

@ -194,9 +194,9 @@ func (fst fileTorrentImplIO) WriteAt(p []byte, off int64) (n int, err error) {
if err == nil {
err = closeErr
}
//if err == nil && int64(n1) != e.Length {
// err = io.ErrShortWrite
//}
if err == nil && int64(n1) != e.Length {
err = io.ErrShortWrite
}
return err == nil
})
return