summaryrefslogtreecommitdiff
path: root/tests/matrix/matrix_test.go
diff options
context:
space:
mode:
authorSebastian Lackner2017-11-28 01:22:55 +0100
committerrfjakob2017-11-28 09:28:06 +0100
commit2591900b6920a71f754779807bafeb01bfef5ab3 (patch)
tree4cef961fa4faae070b0b489d472efa95a90cce11 /tests/matrix/matrix_test.go
parenteba49402e44971fdf007c8b33aa71c29bc2a7cad (diff)
fusefrontend: Handle PlaintextNames mode in Unlink
In PlaintextNames mode the "gocryptfs.longname." prefix does not have any special meaning. We should not attempt to delete any .name files. Partially fixes https://github.com/rfjakob/gocryptfs/issues/174
Diffstat (limited to 'tests/matrix/matrix_test.go')
-rw-r--r--tests/matrix/matrix_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/matrix/matrix_test.go b/tests/matrix/matrix_test.go
index 06c2e71..4194861 100644
--- a/tests/matrix/matrix_test.go
+++ b/tests/matrix/matrix_test.go
@@ -794,4 +794,21 @@ func TestMkfifo(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ err = os.Remove(path)
+ if err != nil {
+ t.Fatal(err)
+ }
+}
+
+// Make sure the Symlink call works with paths starting with "gocryptfs.longname."
+func TestSymlink(t *testing.T) {
+ path := test_helpers.DefaultPlainDir + "/gocryptfs.longname.XXX"
+ err := syscall.Symlink("target", path)
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = os.Remove(path)
+ if err != nil {
+ t.Fatal(err)
+ }
}