fusefrontend_reverse: handle .name files in Access()
These were currently passed to decryptPath() were it caused a warning.
This commit is contained in:
parent
55d0523dbe
commit
45c1ea499e
@ -228,11 +228,14 @@ func (rfs *ReverseFS) GetAttr(relPath string, context *fuse.Context) (*fuse.Attr
|
|||||||
|
|
||||||
// Access - FUSE call
|
// Access - FUSE call
|
||||||
func (rfs *ReverseFS) Access(relPath string, mode uint32, context *fuse.Context) fuse.Status {
|
func (rfs *ReverseFS) Access(relPath string, mode uint32, context *fuse.Context) fuse.Status {
|
||||||
if rfs.isTranslatedConfig(relPath) {
|
if rfs.isTranslatedConfig(relPath) || rfs.isDirIV(relPath) || rfs.isNameFile(relPath) {
|
||||||
return fuse.OK
|
// Virtual files can always be read and never written
|
||||||
}
|
var R_OK uint32 = 4
|
||||||
if rfs.isDirIV(relPath) {
|
if mode == R_OK || mode == 0 {
|
||||||
return fuse.OK
|
return fuse.OK
|
||||||
|
} else {
|
||||||
|
return fuse.EPERM
|
||||||
|
}
|
||||||
}
|
}
|
||||||
absPath, err := rfs.abs(rfs.decryptPath(relPath))
|
absPath, err := rfs.abs(rfs.decryptPath(relPath))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user