summaryrefslogtreecommitdiff
path: root/internal/nametransform/badname.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-10-21 09:37:04 +0200
committerJakob Unterwurzacher2021-10-21 14:55:30 +0200
commitdc32710045f6f46913ae336b6fb77bf90b6bdb85 (patch)
tree890dde8bdef6facc61ee9cd3c4d0246225fee6ad /internal/nametransform/badname.go
parenta652be805e1562948aff4dc232bd1c516ff01d00 (diff)
nametransform: add longNameMax parameter
Determines when to start hashing long names instead of hardcoded 255. Will be used to alleviate "name too long" issues some users see on cloud storage. https://github.com/rfjakob/gocryptfs/issues/499
Diffstat (limited to 'internal/nametransform/badname.go')
-rw-r--r--internal/nametransform/badname.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/nametransform/badname.go b/internal/nametransform/badname.go
index eed0061..6e77561 100644
--- a/internal/nametransform/badname.go
+++ b/internal/nametransform/badname.go
@@ -48,7 +48,7 @@ func (be *NameTransform) EncryptAndHashBadName(name string, iv []byte, dirfd int
//expand suffix on error
continue
}
- if be.longNames && len(cName) > NameMax {
+ if len(cName) > be.longNameMax {
cNamePart = be.HashLongName(cName)
}
cNameBadReverse := cNamePart + name[charpos:len(name)-len(BadnameSuffix)]