diff options
Diffstat (limited to 'pathfs_frontend')
-rw-r--r-- | pathfs_frontend/file.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 |