aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/openbackingdir.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend/openbackingdir.go')
-rw-r--r--internal/fusefrontend/openbackingdir.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/fusefrontend/openbackingdir.go b/internal/fusefrontend/openbackingdir.go
index 4da7fd6..d56848f 100644
--- a/internal/fusefrontend/openbackingdir.go
+++ b/internal/fusefrontend/openbackingdir.go
@@ -33,6 +33,10 @@ func (fs *FS) openBackingDir(relPath string) (dirfd int, cName string, err error
// Cache lookup
dirfd, iv := fs.dirCache.Lookup(dirRelPath)
if dirfd > 0 {
+ // If relPath is empty, cName is ".".
+ if relPath == "" {
+ return dirfd, ".", nil
+ }
name := filepath.Base(relPath)
cName = fs.nameTransform.EncryptAndHashName(name, iv)
return dirfd, cName, nil