summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/fusefrontend/fs.go4
-rw-r--r--tests/matrix/matrix_test.go5
2 files changed, 7 insertions, 2 deletions
diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go
index 8f77538..05167df 100644
--- a/internal/fusefrontend/fs.go
+++ b/internal/fusefrontend/fs.go
@@ -287,9 +287,9 @@ func (fs *FS) Mknod(path string, mode uint32, dev uint32, context *fuse.Context)
return fuse.ToStatus(err)
}
defer dirfd.Close()
- // Create ".name" file to store long file name
+ // Create ".name" file to store long file name (except in PlaintextNames mode)
cName := filepath.Base(cPath)
- if nametransform.IsLongContent(cName) {
+ if !fs.args.PlaintextNames && nametransform.IsLongContent(cName) {
err = fs.nameTransform.WriteLongName(dirfd, cName, path)
if err != nil {
return fuse.ToStatus(err)
diff --git a/tests/matrix/matrix_test.go b/tests/matrix/matrix_test.go
index 170f8ba..06c2e71 100644
--- a/tests/matrix/matrix_test.go
+++ b/tests/matrix/matrix_test.go
@@ -789,4 +789,9 @@ func TestMkfifo(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ path = test_helpers.DefaultPlainDir + "/gocryptfs.longname.XXX"
+ err = syscall.Mkfifo(path, 0700)
+ if err != nil {
+ t.Fatal(err)
+ }
}