diff -r 05647e862a17 -r 81e0f67386a6 dav/main.c --- a/dav/main.c Sat Sep 30 16:33:47 2023 +0200 +++ b/dav/main.c Sat Sep 30 17:26:00 2023 +0200 @@ -2421,7 +2421,7 @@ fprintf(stderr, "Abort\n"); return -1; } - if(get_repository(cx_str(name))) { + if(dav_config_get_repository(get_config(), cx_str(name))) { fprintf(stderr, "Repository %s already exists.\nAbort\n", name); return -1; } @@ -3117,13 +3117,13 @@ } } if(repocomp) { - CxIterator i = get_repositories(); - cx_foreach(Repository*, repo, i) { - if(cx_strprefix(cx_str(repo->name), url)) { + DavConfig *config = get_config(); + for(DavCfgRepository *repo=config->repositories; repo; repo=repo->next) { + if(cx_strprefix(cx_strcast(repo->name.value), url)) { if(quote == '\0') { - printf("%s/\n", repo->name); + printf("%s/\n", repo->name.value.ptr); } else { - printf("%c%s/%c\n", quote, repo->name, quote); + printf("%c%s/%c\n", quote, repo->name.value.ptr, quote); } }