diff -r af91d3c96994 -r 8c700eae3eb8 dav/db.c --- a/dav/db.c Sat Apr 06 14:25:07 2019 +0200 +++ b/dav/db.c Sun Apr 07 09:07:33 2019 +0200 @@ -663,3 +663,18 @@ } free(part); } + +UcxMap* create_hash_index(SyncDatabase *db) { + UcxMap *hmap = ucx_map_new(db->resources->count + 64); + + UcxMapIterator i = ucx_map_iterator(db->resources); + UcxKey key; + LocalResource *res; + UCX_MAP_FOREACH(key, res, i) { + if(res->hash) { + ucx_map_cstr_put(hmap, res->hash, res); + } + } + + return hmap; +}