t9pfuse: fix handling of access mode (thanks Kenji Arisawa) - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 4798a8a5560552480efde5fe8b1f7963a25a96d3
 (DIR) parent da8a485fc143aa323845fafcf0f0f836c76a116b
 (HTM) Author: David du Colombier <0intro@gmail.com>
       Date:   Mon,  5 Feb 2018 21:14:32 +0100
       
       9pfuse: fix handling of access mode (thanks Kenji Arisawa)
       
       Fixes #81.
       
       Diffstat:
         M src/cmd/9pfuse/main.c               |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/cmd/9pfuse/main.c b/src/cmd/9pfuse/main.c
       t@@ -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.