aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/node_dir_ops.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend_reverse/node_dir_ops.go')
-rw-r--r--internal/fusefrontend_reverse/node_dir_ops.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/node_dir_ops.go b/internal/fusefrontend_reverse/node_dir_ops.go
index 22f8122..c287284 100644
--- a/internal/fusefrontend_reverse/node_dir_ops.go
+++ b/internal/fusefrontend_reverse/node_dir_ops.go
@@ -64,7 +64,11 @@ func (n *Node) Readdir(ctx context.Context) (stream fs.DirStream, errno syscall.
!rn.args.ConfigCustom {
cName = configfile.ConfDefaultName
} else {
- cName = rn.nameTransform.EncryptName(entries[i].Name, dirIV)
+ cName, err = rn.nameTransform.EncryptName(entries[i].Name, dirIV)
+ if err != nil {
+ entries[i].Name = "___GOCRYPTFS_INVALID_NAME___"
+ continue
+ }
if len(cName) > unix.NAME_MAX {
cName = rn.nameTransform.HashLongName(cName)
dotNameFile := fuse.DirEntry{