summaryrefslogtreecommitdiff
path: root/cluefs_frontend/fe_file.go
diff options
context:
space:
mode:
Diffstat (limited to 'cluefs_frontend/fe_file.go')
-rw-r--r--cluefs_frontend/fe_file.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cluefs_frontend/fe_file.go b/cluefs_frontend/fe_file.go
index 4c4e38a..58ab0dc 100644
--- a/cluefs_frontend/fe_file.go
+++ b/cluefs_frontend/fe_file.go
@@ -116,8 +116,8 @@ func (f *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.Wri
return err
}
copy(blockData, readResp.Data)
- copy(blockData[ib.Offset:ib.Offset+ib.Length], req.Data)
- blockLen := max(len(readResp.Data), int(ib.Offset+ib.Length))
+ copy(blockData[ib.Skip:ib.Skip+ib.Length], req.Data)
+ blockLen := max(len(readResp.Data), int(ib.Skip+ib.Length))
blockData = blockData[0:blockLen]
} else {
blockData = req.Data[0:f.crfs.PlainBS()]