aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/fs.go
diff options
context:
space:
mode:
authorSebastian Lackner2017-11-28 01:22:55 +0100
committerrfjakob2017-11-28 09:28:06 +0100
commit2591900b6920a71f754779807bafeb01bfef5ab3 (patch)
tree4cef961fa4faae070b0b489d472efa95a90cce11 /internal/fusefrontend/fs.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 'internal/fusefrontend/fs.go')
-rw-r--r--internal/fusefrontend/fs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go
index a77eae0..46787e2 100644
--- a/internal/fusefrontend/fs.go
+++ b/internal/fusefrontend/fs.go
@@ -388,7 +388,7 @@ func (fs *FS) Unlink(path string, context *fuse.Context) (code fuse.Status) {
}
cName := filepath.Base(cPath)
- if nametransform.IsLongContent(cName) {
+ if !fs.args.PlaintextNames && nametransform.IsLongContent(cName) {
var dirfd *os.File
dirfd, err = os.Open(filepath.Dir(cPath))
if err != nil {