diff -r 1c995e93bf40 -r 4b34d12cf211 dav/finfo.c --- a/dav/finfo.c Sat Aug 10 19:54:37 2019 +0200 +++ b/dav/finfo.c Sat Aug 10 21:32:07 2019 +0200 @@ -138,13 +138,13 @@ char *hash = NULL; DavXmlNode *node = xml; - while(node) { + for(;node;node=node->next) { if(node->type == DAV_XML_ELEMENT) { if(!strcmp(node->name, "hash")) { hash = dav_xml_getstring(node->children); } else if(!strcmp(node->name, "xattr")) { char *xattr_name = dav_xml_get_attr(node, "name"); - if(xattr_name) { + if(xattr_name) { names = ucx_list_append(names, strdup(xattr_name)); char *text = dav_xml_getstring(node->children); @@ -165,8 +165,6 @@ } } } - - node = node->next; } XAttributes *attributes = NULL; @@ -190,7 +188,11 @@ return attributes; } -XAttributes* file_get_attributes(const char *path) { +XAttributes* file_get_attributes( + const char *path, + xattr_filter_func filter, + void *filterdata) +{ ssize_t nelm = 0; char **attributes = xattr_list(path, &nelm); if(nelm <= 0) { @@ -206,6 +208,14 @@ size_t nattr = 0; for(int i=0;i= 0) {