summaryrefslogtreecommitdiff
path: root/sdcard
diff options
context:
space:
mode:
Diffstat (limited to 'sdcard')
-rw-r--r--sdcard/sdcard.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index 9ba81ff10..d7bcceaef 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -904,7 +904,9 @@ static int handle_setattr(struct fuse* fuse, struct fuse_handler* handler,
if (!node) {
return -ENOENT;
}
- if (!check_caller_access_to_node(fuse, hdr, node, W_OK, has_rw)) {
+
+ if (!(req->valid & FATTR_FH) &&
+ !check_caller_access_to_node(fuse, hdr, node, W_OK, has_rw)) {
return -EACCES;
}