diff options
author | Sebastian Lackner | 2017-12-08 06:16:16 +0100 |
---|---|---|
committer | rfjakob | 2017-12-11 21:18:20 +0100 |
commit | 631974f9e04fc0ceb1fe859c3e68432b76197c3b (patch) | |
tree | 44ce236f45b11c04496e696b8b5e0dcb80365afb /internal | |
parent | 96dc2ca70906c831b60be1c6ed3a27dbf7628e72 (diff) |
fusefrontend_reverse: Use O_DIRECTORY in OpenDir implementation
Also get rid of the defer - it is not really necessary here.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/fusefrontend_reverse/rfs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/fusefrontend_reverse/rfs.go b/internal/fusefrontend_reverse/rfs.go index 220ed37..f9dde19 100644 --- a/internal/fusefrontend_reverse/rfs.go +++ b/internal/fusefrontend_reverse/rfs.go @@ -255,12 +255,12 @@ func (rfs *ReverseFS) OpenDir(cipherPath string, context *fuse.Context) ([]fuse. return nil, fuse.ToStatus(err) } // Read plaintext dir - fd, err := syscallcompat.OpenNofollow(rfs.args.Cipherdir, relPath, syscall.O_RDONLY, 0) + fd, err := syscallcompat.OpenNofollow(rfs.args.Cipherdir, relPath, syscall.O_RDONLY|syscall.O_DIRECTORY, 0) if err != nil { return nil, fuse.ToStatus(err) } - defer syscall.Close(fd) entries, err := syscallcompat.Getdents(fd) + syscall.Close(fd) if err != nil { return nil, fuse.ToStatus(err) } |