summaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/reverse_longnames.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-08-06 23:12:27 +0200
committerJakob Unterwurzacher2017-08-06 23:14:39 +0200
commit75ec94a87a52a7230c9b7d9b3e150a0da2725e58 (patch)
tree94b24b433b0ec42ae6b9d61c8e7b541000dedebb /internal/fusefrontend_reverse/reverse_longnames.go
parent5190cc09bbc8afca75986dbb14f09e62eda33b61 (diff)
nametransform: add Dir() function
Dir is like filepath.Dir but returns "" instead of ".". This was already implemented in fusefrontend_reverse as saneDir(). We will need it in nametransform for the improved diriv caching.
Diffstat (limited to 'internal/fusefrontend_reverse/reverse_longnames.go')
-rw-r--r--internal/fusefrontend_reverse/reverse_longnames.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/reverse_longnames.go b/internal/fusefrontend_reverse/reverse_longnames.go
index 3b2ddea..ec164f1 100644
--- a/internal/fusefrontend_reverse/reverse_longnames.go
+++ b/internal/fusefrontend_reverse/reverse_longnames.go
@@ -86,7 +86,7 @@ func (rfs *ReverseFS) newNameFile(relPath string) (nodefs.File, fuse.Status) {
dotName := filepath.Base(relPath) // gocryptfs.longname.XYZ.name
longname := dotName[:len(dotName)-len(nametransform.LongNameSuffix)] // gocryptfs.longname.XYZ
// cipher directory
- cDir := saneDir(relPath)
+ cDir := nametransform.Dir(relPath)
// plain directory
pDir, err := rfs.decryptPath(cDir)
if err != nil {