Mon, 11 Jun 2018 19:32:41 +0200
check tagfilter scope after checking tagfilter existence
dav/sync.c | file | annotate | diff | comparison | revisions |
--- a/dav/sync.c Mon Jun 11 19:31:03 2018 +0200 +++ b/dav/sync.c Mon Jun 11 19:32:41 2018 +0200 @@ -259,15 +259,15 @@ } static int res_matches_tags(DavResource *res, SyncTagFilter *tagfilter) { + if(!tagfilter || tagfilter->mode == DAV_SYNC_TAGFILTER_OFF) { + return 1; + } int scope = res->iscollection ? DAV_SYNC_TAGFILTER_SCOPE_COLLECTION : DAV_SYNC_TAGFILTER_SCOPE_RESOURCE; if(tagfilter->scope & scope != scope) { return 1; } - if(!tagfilter || tagfilter->mode == DAV_SYNC_TAGFILTER_OFF) { - return 1; - } DavXmlNode *tagsprop = dav_get_property_ns(res, DAV_NS, "tags"); UcxList *res_tags = parse_dav_xml_taglist(tagsprop); @@ -285,15 +285,15 @@ LocalResource *res, SyncTagFilter *tagfilter) { + if(!tagfilter || tagfilter->mode == DAV_SYNC_TAGFILTER_OFF) { + return 1; + } int scope = res->isdirectory ? DAV_SYNC_TAGFILTER_SCOPE_COLLECTION : DAV_SYNC_TAGFILTER_SCOPE_RESOURCE; if(tagfilter->scope & scope != scope) { return 1; } - if(!tagfilter || tagfilter->mode == DAV_SYNC_TAGFILTER_OFF) { - return 1; - } DavBool changed = 0; UcxList *res_tags = sync_get_file_tags(dir, res, &changed);