dav/scfg.c

changeset 319
2433b5969d44
parent 316
9d0505d80044
child 347
b6ff6be7aa91
equal deleted inserted replaced
318:7e0694423838 319:2433b5969d44
33 #include <libidav/utils.h> 33 #include <libidav/utils.h>
34 #include <ucx/map.h> 34 #include <ucx/map.h>
35 #include <ucx/utils.h> 35 #include <ucx/utils.h>
36 36
37 #include "scfg.h" 37 #include "scfg.h"
38 #include "config.h"
38 39
39 #define xstreq(a,b) xmlStrEqual(BAD_CAST a, BAD_CAST b) 40 #define xstreq(a,b) xmlStrEqual(BAD_CAST a, BAD_CAST b)
40 41
41 42
42 #define print_error(lineno, ...) \ 43 #define print_error(lineno, ...) \
271 } 272 }
272 273
273 int load_sync_config() { 274 int load_sync_config() {
274 directories = ucx_map_new(8); 275 directories = ucx_map_new(8);
275 276
277 if(check_config_dir()) {
278 fprintf(stderr, "Cannot create .dav directory\n");
279 return 1;
280 }
281
276 char *file = util_concat_path(ENV_HOME, ".dav/sync.xml"); 282 char *file = util_concat_path(ENV_HOME, ".dav/sync.xml");
277 283
278 struct stat s; 284 struct stat s;
279 if(stat(file, &s)) { 285 if(stat(file, &s)) {
280 switch(errno) { 286 switch(errno) {

mercurial