summaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/ctlsock_interface.go
diff options
context:
space:
mode:
authorNekoGirlSAIKOU2022-04-25 01:35:30 +0800
committerJakob Unterwurzacher2022-08-28 11:09:01 +0200
commit1bff80b46cf3cdd2d6934ebf905fca96dde7af97 (patch)
treef9548101774bf4ed5d3e412d81e34f0fcf07cacc /internal/fusefrontend_reverse/ctlsock_interface.go
parentbf29c9f99d90343d608c86b536c36abece158591 (diff)
Fix invalid -longnamemax for reverse mode
Diffstat (limited to 'internal/fusefrontend_reverse/ctlsock_interface.go')
-rw-r--r--internal/fusefrontend_reverse/ctlsock_interface.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/ctlsock_interface.go b/internal/fusefrontend_reverse/ctlsock_interface.go
index 9266cbf..1bfe1c9 100644
--- a/internal/fusefrontend_reverse/ctlsock_interface.go
+++ b/internal/fusefrontend_reverse/ctlsock_interface.go
@@ -26,7 +26,7 @@ func (rn *RootNode) EncryptPath(plainPath string) (string, error) {
if err != nil {
return "", err
}
- if rn.args.LongNames && len(encryptedPart) > unix.NAME_MAX {
+ if rn.args.LongNames && (len(encryptedPart) > unix.NAME_MAX || len(encryptedPart) > rn.nameTransform.GetLongNameMax()) {
encryptedPart = rn.nameTransform.HashLongName(encryptedPart)
}
cipherPath = filepath.Join(cipherPath, encryptedPart)