Mon, 14 Nov 2016 19:02:40 +0100
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; }