Update mtime on write.

geesefs-0-30-9
Aaron Jacobs 2015-03-06 05:27:04 +11:00
parent 77fee50b80
commit 087f48cc72
1 changed files with 3 additions and 0 deletions

View File

@ -344,6 +344,9 @@ func (inode *inode) WriteAt(p []byte, off int64) (n int, err error) {
panic("WriteAt called on directory.")
}
// Update the modification time.
inode.attributes.Mtime = inode.clock.Now()
// Ensure that the contents slice is long enough.
newLen := int(off) + len(p)
if len(inode.contents) < newLen {