aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/weedfs_attr.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mount/weedfs_attr.go')
-rw-r--r--weed/mount/weedfs_attr.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/mount/weedfs_attr.go b/weed/mount/weedfs_attr.go
index 3ef36c492..7691d4e59 100644
--- a/weed/mount/weedfs_attr.go
+++ b/weed/mount/weedfs_attr.go
@@ -50,12 +50,12 @@ func (wfs *WFS) SetAttr(cancel <-chan struct{}, input *fuse.SetAttrIn, out *fuse
}
if size, ok := input.GetSize(); ok && entry != nil {
- glog.V(4).Infof("%v setattr set size=%v chunks=%d", path, size, len(entry.Chunks))
+ glog.V(4).Infof("%v setattr set size=%v chunks=%d", path, size, len(entry.GetChunks()))
if size < filer.FileSize(entry) {
// fmt.Printf("truncate %v \n", fullPath)
var chunks []*filer_pb.FileChunk
var truncatedChunks []*filer_pb.FileChunk
- for _, chunk := range entry.Chunks {
+ for _, chunk := range entry.GetChunks() {
int64Size := int64(chunk.Size)
if chunk.Offset+int64Size > int64(size) {
// this chunk is truncated