Fixed a broken invariant.

geesefs-0-30-9
Aaron Jacobs 2015-03-05 19:36:09 +11:00
parent 7bb6fe37d2
commit 26d91ad9d7
1 changed files with 1 additions and 0 deletions

View File

@ -304,6 +304,7 @@ func (inode *inode) WriteAt(p []byte, off int64) (n int, err error) {
if len(inode.contents) < newLen {
padding := make([]byte, newLen-len(inode.contents))
inode.contents = append(inode.contents, padding...)
inode.attributes.Size = uint64(newLen)
}
// Copy in the data.