fix iterator misuse in dav-sync delete-conflict

Tue, 13 Jun 2023 21:58:29 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 13 Jun 2023 21:58:29 +0200
changeset 762
098b2e3ab240
parent 761
a2f1d7c1755c
child 763
fc24d1d1d695

fix iterator misuse in dav-sync delete-conflict

dav/sync.c file | annotate | diff | comparison | revisions
test/bin-test/test-dav-sync-pull-conflict.sh file | annotate | diff | comparison | revisions
--- a/dav/sync.c	Mon Jun 12 21:43:12 2023 +0200
+++ b/dav/sync.c	Tue Jun 13 21:58:29 2023 +0200
@@ -4799,7 +4799,7 @@
     int ret = 0;
     
     // delete all conflict files
-    CxIterator i = cxMapIterator(db->conflict);
+    CxIterator i = cxMapIteratorValues(db->conflict);
     cx_foreach(LocalResource*, res, i) {
         printf("delete: %s\n", res->path);
         char *path = create_local_path(dir, res->path);
--- a/test/bin-test/test-dav-sync-pull-conflict.sh	Mon Jun 12 21:43:12 2023 +0200
+++ b/test/bin-test/test-dav-sync-pull-conflict.sh	Tue Jun 13 21:58:29 2023 +0200
@@ -177,6 +177,7 @@
 # don't check if the conflict file has this specific name
 
 $DAV_SYNC_BIN delete-conflicts test1b > tmp-sync/out.txt
+
 if [ $? -ne 0 ]; then
 	echo "test 3: delete-conflicts failed"
 	exit 2

mercurial