# HG changeset patch # User Olaf Wintermann # Date 1555060396 -7200 # Node ID 9a88920b15d8aec3a3e1375f447d6261612a9d04 # Parent 26898e00ddff61134da16cc21ef7ee61d9d2b8bd increase snyc_conflict counter only after conflict renaming, to make sure the counter is correct when pull is aborted diff -r 26898e00ddff -r 9a88920b15d8 dav/sync.c --- a/dav/sync.c Fri Apr 12 11:06:04 2019 +0200 +++ b/dav/sync.c Fri Apr 12 11:13:16 2019 +0200 @@ -695,6 +695,10 @@ } } + // + // BEGIN PULL + // + // the first thing we need are all directories to put the files in UCX_FOREACH(elm, res_mkdir) { DavResource *res = elm->data; @@ -710,7 +714,6 @@ // we need a map for all conflicts for fast lookups UcxMap *conflicts = ucx_map_new(ucx_list_size(res_conflict)+16); UCX_FOREACH(elm, res_conflict) { - sync_conflict++; DavResource *res = elm->data; ucx_map_cstr_put(conflicts, res->path, res); } @@ -727,6 +730,7 @@ DavBool issplit = dav_get_property_ns(res, DAV_NS, "split") ? 1 : 0; if(ucx_map_cstr_get(conflicts, res->path)) { rename_conflict_file(dir, db, res->path, issplit); + sync_conflict++; } // download the resource