dav/libxattr.c

changeset 369
4322b8953bd5
parent 364
3769ba002fd1
child 379
cdaf5a3d3a50
--- a/dav/libxattr.c	Sat Feb 03 15:59:53 2018 +0100
+++ b/dav/libxattr.c	Sun Feb 04 11:14:20 2018 +0100
@@ -339,7 +339,7 @@
 }
 
 int xattr_set(const char *path, const char *name, const void *value, size_t len) {
-    int attrfile = open_attrfile(path, name, O_CREAT|O_WRONLY|O_XATTR);
+    int attrfile = open_attrfile(path, name, O_CREAT|O_WRONLY|O_XATTR|O_TRUNC);
     if(attrfile == -1) {
         return -1;
     }

mercurial