fixed dav-sync crash when sync.xml is missing

Wed, 02 Mar 2016 10:20:38 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 02 Mar 2016 10:20:38 +0100
changeset 202
faa41a5e817d
parent 201
8e5856182668
child 203
9a93ebd71984

fixed dav-sync crash when sync.xml is missing

dav/scfg.c file | annotate | diff | comparison | revisions
--- a/dav/scfg.c	Sun Feb 28 18:14:28 2016 +0100
+++ b/dav/scfg.c	Wed Mar 02 10:20:38 2016 +0100
@@ -62,6 +62,8 @@
 }
 
 int load_sync_config() {
+    directories = ucx_map_new(8);
+    
     char *file = util_concat_path(ENV_HOME, ".dav/sync.xml");
     
     struct stat s;
@@ -86,8 +88,6 @@
         return -1;
     }
     
-    directories = ucx_map_new(8);
-    
     int ret = 0;
     xmlNode *node = xmlDocGetRootElement(doc)->children;
     while(node) {

mercurial