summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 74ba451)
raw | patch | inline | side by side (parent: 74ba451)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 13 Aug 2010 21:15:48 +0000 (23:15 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 13 Aug 2010 21:17:34 +0000 (23:17 +0200) |
src/configfile.c | patch | blob | history |
diff --git a/src/configfile.c b/src/configfile.c
index 2eea2362a5a39396eaabacef5a339202a624ad2d..b1cd7b8634062670a6a22e548ab77ac4cb0e2566 100644 (file)
--- a/src/configfile.c
+++ b/src/configfile.c
if (status != 0)
{
char errbuf[1024];
- ERROR ("configfile: stat (%s) failed: %s",
+ WARNING ("configfile: stat (%s) failed: %s",
path_ptr,
sstrerror (errno, errbuf, sizeof (errbuf)));
- oconfig_free (root);
- return (NULL);
+ continue;
}
if (S_ISREG (statbuf.st_mode))
temp = cf_read_dir (path_ptr, depth);
else
{
- ERROR ("configfile: %s is neither a file nor a "
+ WARNING ("configfile: %s is neither a file nor a "
"directory.", path);
continue;
}
wordfree (&we);
+ if (root->children == NULL)
+ {
+ oconfig_free (root);
+ return (NULL);
+ }
+
return (root);
} /* oconfig_item_t *cf_read_generic */
/* #endif HAVE_WORDEXP_H */