summaryrefslogtreecommitdiff
path: root/props.c
diff options
context:
space:
mode:
Diffstat (limited to 'props.c')
-rw-r--r--props.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/props.c b/props.c
index c09865b3..04b9e5f1 100644
--- a/props.c
+++ b/props.c
@@ -119,8 +119,9 @@ static int prop_compression(enum prop_object_type type,
DIR *dirstream = NULL;
char *buf = NULL;
char *xattr_name = NULL;
+ int open_flags = value ? O_RDWR : O_RDONLY;
- fd = open_file_or_dir(object, &dirstream);
+ fd = open_file_or_dir3(object, &dirstream, open_flags);
if (fd == -1) {
ret = -errno;
fprintf(stderr, "ERROR: open %s failed. %s\n",