aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9pfuse
diff options
context:
space:
mode:
authorDavid du Colombier <0intro@gmail.com>2018-02-05 21:14:32 +0100
committerDavid du Colombier <0intro@gmail.com>2018-02-05 21:14:32 +0100
commit4798a8a5560552480efde5fe8b1f7963a25a96d3 (patch)
tree1bb96fbc6dd4954f955a57de3049f1473510678d /src/cmd/9pfuse
parentda8a485fc143aa323845fafcf0f0f836c76a116b (diff)
downloadplan9port-4798a8a5560552480efde5fe8b1f7963a25a96d3.tar.gz
plan9port-4798a8a5560552480efde5fe8b1f7963a25a96d3.tar.bz2
plan9port-4798a8a5560552480efde5fe8b1f7963a25a96d3.zip
9pfuse: fix handling of access mode (thanks Kenji Arisawa)
Fixes #81.
Diffstat (limited to 'src/cmd/9pfuse')
-rw-r--r--src/cmd/9pfuse/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/9pfuse/main.c b/src/cmd/9pfuse/main.c
index cbce3ffd..a3662898 100644
--- a/src/cmd/9pfuse/main.c
+++ b/src/cmd/9pfuse/main.c
@@ -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.