From c859f0b2dc8825763c3b63163a014435a8cdb3cf Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 4 Oct 2015 14:24:43 +0200 Subject: intraBlock: Rename Offset to Skip "Offset" is unclear whether it is an offset from the start of file or start of block. "Skip" seems much better. --- pathfs_frontend/file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pathfs_frontend') diff --git a/pathfs_frontend/file.go b/pathfs_frontend/file.go index 733bfd0..cc8de17 100644 --- a/pathfs_frontend/file.go +++ b/pathfs_frontend/file.go @@ -153,7 +153,7 @@ func (f *file) doWrite(data []byte, off int64) (uint32, fuse.Status) { return written, status } // Modify - blockData = f.cfs.MergeBlocks(oldData, blockData, int(b.Offset)) + blockData = f.cfs.MergeBlocks(oldData, blockData, int(b.Skip)) cryptfs.Debug.Printf("len(oldData)=%d len(blockData)=%d\n", len(oldData), len(blockData)) } @@ -253,7 +253,7 @@ func (f *file) Truncate(newSize uint64) fuse.Status { // First and last block may be partial if b.IsPartial() { off, _ := b.PlaintextRange() - off += b.Offset + off += b.Skip _, status := f.doWrite(make([]byte, b.Length), int64(off)) if status != fuse.OK { return status -- cgit v1.2.3