aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/node.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-06-06 19:22:16 +0200
committerJakob Unterwurzacher2021-06-06 19:22:16 +0200
commit17f859d3c409bf2730a47d56979c0700171006b7 (patch)
tree79d9e0bb8042ba516e89490fb39b13fd8ff3ce4a /internal/fusefrontend/node.go
parent6910f8670502b57cc442d3c45c5e5be1165b3d2c (diff)
fusefronted: report plaintext size on symlink creation
gocryptfs 2.0 introduced the regression that the size reported at symlink creation was the ciphertext size, which is wrong. Report the plaintext size. Fixes https://github.com/rfjakob/gocryptfs/issues/574
Diffstat (limited to 'internal/fusefrontend/node.go')
-rw-r--r--internal/fusefrontend/node.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/fusefrontend/node.go b/internal/fusefrontend/node.go
index 657a3bc..8370a22 100644
--- a/internal/fusefrontend/node.go
+++ b/internal/fusefrontend/node.go
@@ -354,6 +354,9 @@ func (n *Node) Symlink(ctx context.Context, target, name string, out *fuse.Entry
errno = fs.ToErrno(err)
return
}
+ // Report the plaintext size, not the encrypted blob size
+ st.Size = int64(len(target))
+
inode = n.newChild(ctx, st, out)
return inode, 0
}