diff -r 8ac7b8d56115 -r bb49953b1cf8 dav/config.c --- a/dav/config.c Tue Sep 05 12:11:09 2017 +0200 +++ b/dav/config.c Tue Sep 05 13:07:29 2017 +0200 @@ -84,6 +84,16 @@ xmlFreeDoc(doc); } +char* config_file_path(char *name) { + char *davd = util_concat_path(ENV_HOME, ".dav"); + if(!davd) { + return NULL; + } + char *path = util_concat_path(davd, name); + free(davd); + return path; +} + int load_config(DavContext *ctx) { context = ctx; // TODO: free the config somewhere