mirror of
https://github.com/octoleo/restic.git
synced 2024-11-29 00:06:32 +00:00
parent
58236ead12
commit
fdc738fb70
8
changelog/unreleased/issue-3667
Normal file
8
changelog/unreleased/issue-3667
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Bugfix: restic mount now reports symlinks sizes
|
||||||
|
|
||||||
|
Symlinks used to have size zero in restic mountpoints, confusing some
|
||||||
|
third-party tools. They now have a size equal to the byte length of their
|
||||||
|
target path, as required by POSIX.
|
||||||
|
|
||||||
|
https://github.com/restic/restic/issues/3667
|
||||||
|
https://github.com/restic/restic/pull/3668
|
@ -1,3 +1,4 @@
|
|||||||
|
//go:build darwin || freebsd || linux
|
||||||
// +build darwin freebsd linux
|
// +build darwin freebsd linux
|
||||||
|
|
||||||
package fuse
|
package fuse
|
||||||
@ -40,6 +41,8 @@ func (l *link) Attr(ctx context.Context, a *fuse.Attr) error {
|
|||||||
a.Mtime = l.node.ModTime
|
a.Mtime = l.node.ModTime
|
||||||
|
|
||||||
a.Nlink = uint32(l.node.Links)
|
a.Nlink = uint32(l.node.Links)
|
||||||
|
a.Size = uint64(len(l.node.LinkTarget))
|
||||||
|
a.Blocks = 1 + a.Size/blockSize
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user