From 24b3978715186bed3edc2703e81f165a73c0a74a Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 29 Mar 2023 22:16:14 +0200 Subject: fusefrontent: report correct size on hard link creation And add a test for it. Fixes https://github.com/rfjakob/gocryptfs/issues/724 --- internal/fusefrontend/node_helpers.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/fusefrontend/node_helpers.go') diff --git a/internal/fusefrontend/node_helpers.go b/internal/fusefrontend/node_helpers.go index 46046f1..f5dfeb6 100644 --- a/internal/fusefrontend/node_helpers.go +++ b/internal/fusefrontend/node_helpers.go @@ -62,6 +62,7 @@ func (n *Node) translateSize(dirfd int, cName string, out *fuse.Attr) { rn := n.rootNode() out.Size = rn.contentEnc.CipherSizeToPlainSize(out.Size) } else if out.IsSymlink() { + // read and decrypt target target, _ := n.readlink(dirfd, cName) out.Size = uint64(len(target)) } -- cgit v1.2.3