There has never been deliberately fucked up error handling for missing sync.xml.

Mon, 14 Nov 2016 19:02:40 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 14 Nov 2016 19:02:40 +0100
changeset 253
1d2be1b31e70
parent 252
6b8e287269fc
child 254
d7c4ba50b7d8

There has never been deliberately fucked up error handling for missing sync.xml.

dav/scfg.c file | annotate | diff | comparison | revisions
--- a/dav/scfg.c	Fri Nov 11 15:03:19 2016 +0100
+++ b/dav/scfg.c	Mon Nov 14 19:02:40 2016 +0100
@@ -58,7 +58,7 @@
 static int create_default_sync_config(char *file) {
     FILE *out = fopen(file, "w");
     if(!out) {
-        perror("fopen");
+        perror("Cannot create config file");
         return -1;
     }
     
@@ -80,8 +80,7 @@
         switch(errno) {
             case ENOENT: {
                 if(create_default_sync_config(file)) {
-                    /* this recursion is safe: ENOENT cannot occur again */
-                    return load_sync_config();
+                    return 1;
                 }
                 break;
             }

mercurial