diff options
author | Jakob Unterwurzacher | 2021-06-06 19:22:16 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-06-06 19:22:16 +0200 |
commit | 17f859d3c409bf2730a47d56979c0700171006b7 (patch) | |
tree | 79d9e0bb8042ba516e89490fb39b13fd8ff3ce4a /internal/fusefrontend/node_helpers.go | |
parent | 6910f8670502b57cc442d3c45c5e5be1165b3d2c (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_helpers.go')
-rw-r--r-- | internal/fusefrontend/node_helpers.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/fusefrontend/node_helpers.go b/internal/fusefrontend/node_helpers.go index 6c30523..b2f1d4a 100644 --- a/internal/fusefrontend/node_helpers.go +++ b/internal/fusefrontend/node_helpers.go @@ -58,6 +58,8 @@ func (n *Node) readlink(dirfd int, cName string) (out []byte, errno syscall.Errn } // translateSize translates the ciphertext size in `out` into plaintext size. +// Handles regular files & symlinks (and finds out what is what by looking at +// `out.Mode`). func (n *Node) translateSize(dirfd int, cName string, out *fuse.Attr) { if out.IsRegular() { rn := n.rootNode() |