summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/names.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend/names.go')
-rw-r--r--internal/fusefrontend/names.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/fusefrontend/names.go b/internal/fusefrontend/names.go
index 5530e3e..3bf64d5 100644
--- a/internal/fusefrontend/names.go
+++ b/internal/fusefrontend/names.go
@@ -60,9 +60,15 @@ func (fs *FS) openBackingDir(relPath string) (dirfd int, cName string, err error
// encryptPath - encrypt relative plaintext path
func (fs *FS) encryptPath(plainPath string) (string, error) {
+ if plainPath != "" { // Empty path gets encrypted all the time without actual file accesses.
+ fs.AccessedSinceLastCheck = 1
+ } else { // Empty string gets encrypted as empty string
+ return plainPath, nil
+ }
if fs.args.PlaintextNames {
return plainPath, nil
}
+
fs.dirIVLock.RLock()
cPath, err := fs.nameTransform.EncryptPathDirIV(plainPath, fs.args.Cipherdir)
tlog.Debug.Printf("encryptPath '%s' -> '%s' (err: %v)", plainPath, cPath, err)