diff options
author | Jakob Unterwurzacher | 2016-09-22 23:28:11 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-09-25 16:43:17 +0200 |
commit | a6a7b424f8e8a0f8ddd1c94b7463250ef1337811 (patch) | |
tree | 2281d7062d893d70209ecb7a82589e49decac164 /internal/nametransform/longnames.go | |
parent | 35bcc2dca2dc928e3b7c31e34d785b7a42c06722 (diff) |
reverse: resolve long names in Open and GetAttr
The last patch added functionality for generating gocryptfs.longname.*
files, this patch adds support for mapping them back to the full
filenames.
Note that resolving a long name needs a full readdir. A cache
will be implemented later on to improve performance.
Diffstat (limited to 'internal/nametransform/longnames.go')
-rw-r--r-- | internal/nametransform/longnames.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/nametransform/longnames.go b/internal/nametransform/longnames.go index cf7f34c..e61e21b 100644 --- a/internal/nametransform/longnames.go +++ b/internal/nametransform/longnames.go @@ -31,9 +31,14 @@ func HashLongName(name string) string { // Values returned by IsLongName const ( - LongNameContent = iota + // File that stores the file content. + // Example: gocryptfs.longname.URrM8kgxTKYMgCk4hKk7RO9Lcfr30XQof4L_5bD9Iro= + LongNameContent = iota + // File that stores the full encrypted filename. + // Example: gocryptfs.longname.URrM8kgxTKYMgCk4hKk7RO9Lcfr30XQof4L_5bD9Iro=.name LongNameFilename = iota - LongNameNone = iota + // Example: i1bpTaVLZq7sRNA9mL_2Ig== + LongNameNone = iota ) // NameType - detect if cName is |