fusefrontend_reverse: Use O_DIRECTORY in OpenDir implementation
Also get rid of the defer - it is not really necessary here.
This commit is contained in:
parent
96dc2ca709
commit
631974f9e0
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user