9pfuse: fix handling of access mode (thanks Kenji Arisawa)

Fixes #81.
This commit is contained in:
David du Colombier 2018-02-05 21:14:32 +01:00
parent da8a485fc1
commit 4798a8a556

View file

@ -505,7 +505,9 @@ fusesetattr(FuseMsg *m)
if(in->valid&FATTR_MTIME)
d.mtime = in->mtime;
if(in->valid&FATTR_MODE)
d.mode = in->mode;
d.mode = in->mode & 0777;
if((in->mode&S_IFMT) == S_IFDIR)
d.mode |= DMDIR;
if((in->valid&FATTR_UID) || (in->valid&FATTR_GID)){
/*
* I can't be bothered with these yet.