# HG changeset patch # User Mike Becker # Date 1527691912 -7200 # Node ID 438c8fe7d62f232c3ade733a2efd2a4933c709b9 # Parent 4853fbad5014544646f8e0782f524bca7fe0fba9 parse_csv_taglist() now skips empty tags diff -r 4853fbad5014 -r 438c8fe7d62f dav/tags.c --- a/dav/tags.c Wed May 30 16:49:25 2018 +0200 +++ b/dav/tags.c Wed May 30 16:51:52 2018 +0200 @@ -97,10 +97,13 @@ ssize_t count = 0; sstr_t *tags = sstrsplit(str, S(","), &count); for(int i=0;iname = sstrdup(sstrtrim(tags[i])).ptr; - tag->color = NULL; - taglist = ucx_list_append(taglist, tag); + sstr_t trimmed_tag = sstrtrim(tags[i]); + if (trimmed_tag.length > 0) { + DavTag *tag = malloc(sizeof(DavTag)); + tag->name = sstrdup(trimmed_tag).ptr; + tag->color = NULL; + taglist = ucx_list_append(taglist, tag); + } free(tags[i].ptr); } if(tags) {