From 4c280bc3178ad17eeb3588915906c73a892cedcd Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 12 Jul 2013 00:55:21 -0700 Subject: [PATCH] ensure append only for deleted files --- go/storage/volume.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/storage/volume.go b/go/storage/volume.go index 2c6608ac2..c2081b2fe 100644 --- a/go/storage/volume.go +++ b/go/storage/volume.go @@ -229,10 +229,10 @@ func (v *Volume) delete(n *Needle) (uint32, error) { if err = v.nm.Delete(n.Id); err != nil { return nv.Size, err } - if _, err = v.dataFile.Seek(int64(nv.Offset*NeedlePaddingSize), 0); err != nil { + if _, err = v.dataFile.Seek(0, 2); err != nil { return nv.Size, err } - n.Data = make([]byte,0) + n.Data = make([]byte, 0) _, err = n.Append(v.dataFile, v.Version()) return nv.Size, err }