dav/scfg.c

changeset 319
2433b5969d44
parent 316
9d0505d80044
child 347
b6ff6be7aa91
--- a/dav/scfg.c	Sun Oct 01 17:37:59 2017 +0200
+++ b/dav/scfg.c	Tue Oct 03 14:59:35 2017 +0200
@@ -35,6 +35,7 @@
 #include <ucx/utils.h>
 
 #include "scfg.h"
+#include "config.h"
 
 #define xstreq(a,b) xmlStrEqual(BAD_CAST a, BAD_CAST b)
 
@@ -273,6 +274,11 @@
 int load_sync_config() {
     directories = ucx_map_new(8);
     
+    if(check_config_dir()) {
+        fprintf(stderr, "Cannot create .dav directory\n");
+        return 1;
+    }
+    
     char *file = util_concat_path(ENV_HOME, ".dav/sync.xml");
     
     struct stat s;

mercurial