v2api: Setattr: fill out structure

This commit is contained in:
Jakob Unterwurzacher 2020-07-12 21:17:52 +02:00
parent d7db071528
commit 4a0966e79e

View File

@ -361,12 +361,15 @@ func (n *Node) Setattr(ctx context.Context, f fs.FileHandle, in *fuse.SetAttrIn,
return errno return errno
} }
f2 := f.(*File2) f2 := f.(*File2)
defer f2.Release(ctx)
errno = syscall.Errno(f2.truncate(sz)) errno = syscall.Errno(f2.truncate(sz))
if errno != 0 { if errno != 0 {
return errno return errno
} }
return f2.Getattr(ctx, out)
} }
return 0
return n.Getattr(ctx, nil, out)
} }
// StatFs - FUSE call. Returns information about the filesystem. // StatFs - FUSE call. Returns information about the filesystem.