dav/sync.c

changeset 579
c80d5730c00b
parent 578
bb1e60fada74
child 580
caf23cf7f96d
equal deleted inserted replaced
578:bb1e60fada74 579:c80d5730c00b
596 int sync_conflict = 0; 596 int sync_conflict = 0;
597 597
598 UcxList *res_modified = NULL; 598 UcxList *res_modified = NULL;
599 UcxList *res_new = NULL; 599 UcxList *res_new = NULL;
600 UcxList *res_moved = NULL; // type: MovedFile 600 UcxList *res_moved = NULL; // type: MovedFile
601 UcxList *res_link;
601 UcxList *res_conflict = NULL; 602 UcxList *res_conflict = NULL;
602 UcxList *res_mkdir = NULL; 603 UcxList *res_mkdir = NULL;
603 UcxList *res_metadata = NULL; 604 UcxList *res_metadata = NULL;
604 UcxList *res_broken = NULL; 605 UcxList *res_broken = NULL;
605 UcxMap *lres_removed = ucx_map_new(16); // type: LocalResource* 606 UcxMap *lres_removed = ucx_map_new(16); // type: LocalResource*
968 ret = REMOTE_CHANGE_MKDIR; 969 ret = REMOTE_CHANGE_MKDIR;
969 } 970 }
970 } else if(local) { 971 } else if(local) {
971 DavBool nochange = FALSE; 972 DavBool nochange = FALSE;
972 char *content_hash = sync_get_content_hash(res); 973 char *content_hash = sync_get_content_hash(res);
973 974 char *link = dav_get_string_property_ns(res, DAV_NS, "link");
974 if(content_hash && local->hash) { 975
976 if(nullstrcmp(link, local->link_target)) {
977 ret = REMOTE_CHANGE_MODIFIED;
978 } else if(content_hash && local->hash) {
975 if(!strcmp(content_hash, local->hash)) { 979 if(!strcmp(content_hash, local->hash)) {
976 nochange = TRUE; 980 nochange = TRUE;
977 } 981 }
978 } else if(local->etag) { 982 } else if(local->etag) {
979 sstr_t e = sstr(etag); 983 sstr_t e = sstr(etag);

mercurial