Report symlink sizes from FUSE mount

Fixes #3667.
This commit is contained in:
greatroar
2022-03-13 16:42:43 +01:00
parent 58236ead12
commit fdc738fb70
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
//go:build darwin || freebsd || linux
// +build darwin freebsd linux
package fuse
@@ -40,6 +41,8 @@ func (l *link) Attr(ctx context.Context, a *fuse.Attr) error {
a.Mtime = l.node.ModTime
a.Nlink = uint32(l.node.Links)
a.Size = uint64(len(l.node.LinkTarget))
a.Blocks = 1 + a.Size/blockSize
return nil
}