aboutsummaryrefslogtreecommitdiff
path: root/internal/nametransform/diriv.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-11-01 10:34:41 +0100
committerJakob Unterwurzacher2016-11-01 10:34:41 +0100
commita9c7565b8002a98f7dc77dfd675ecf1c803fe6b5 (patch)
tree53eb77082018397b60c2f1b9b475f2f41c97e436 /internal/nametransform/diriv.go
parentfd88dbd6873eb28b3b245c4e35933df6f3d3ad32 (diff)
fusefrontend: refactor dirIVCache
Simplify the code a bit.
Diffstat (limited to 'internal/nametransform/diriv.go')
-rw-r--r--internal/nametransform/diriv.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/nametransform/diriv.go b/internal/nametransform/diriv.go
index 30d4b87..f8734db 100644
--- a/internal/nametransform/diriv.go
+++ b/internal/nametransform/diriv.go
@@ -92,8 +92,8 @@ func (be *NameTransform) EncryptPathDirIV(plainPath string, rootDir string) (cip
}
// Check if the DirIV is cached
parentDir := filepath.Dir(plainPath)
- found, iv, cParentDir := be.DirIVCache.lookup(parentDir)
- if found {
+ iv, cParentDir := be.DirIVCache.lookup(parentDir)
+ if iv != nil {
cBaseName := be.EncryptName(baseName, iv)
if be.longNames && len(cBaseName) > syscall.NAME_MAX {
cBaseName = HashLongName(cBaseName)