diff -r 11797f33bc24 -r 4322b8953bd5 dav/libxattr.c --- 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; }