X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fconf.c;h=e927abdbdfa9bb2ca9f9898caabd963ab8d5680a;hp=e57eb8bd0831919761773c0fd212f2a01d1799b3;hb=7e74e00d167da659ba6c3db3e8822008d27c081b;hpb=c7bf64c7946ece3e1a6a7cdd7bce00045bddb9cd diff --git a/src/conf.c b/src/conf.c index e57eb8bd..e927abdb 100644 --- a/src/conf.c +++ b/src/conf.c @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: conf.c,v 1.9.4.70 2003/08/02 15:27:24 guus Exp $ + $Id: conf.c,v 1.9.4.74 2003/08/08 14:59:27 guus Exp $ */ #include "system.h" @@ -359,11 +359,11 @@ int read_config_file(avl_tree_t *config_tree, const char *fname) lineno++; - if(*line == '#') + if(!*line || *line == '#') continue; if(ignore) { - if(!strncmp(variable, "-----END", 8)) + if(!strncmp(line, "-----END", 8)) ignore = false; continue; } @@ -390,7 +390,6 @@ int read_config_file(avl_tree_t *config_tree, const char *fname) break; } - logger(LOG_DEBUG, "%s=%s", variable, value); cfg = new_config(); cfg->variable = xstrdup(variable); cfg->value = xstrdup(value); @@ -546,7 +545,11 @@ FILE *ask_and_safe_open(const char *filename, const char *what, bool safe, const fn = xstrdup(filename); } - if(!strchr(fn, '/') || fn[0] != '/') { +#ifdef HAVE_MINGW + if(fn[0] != '\\' && fn[0] != '/' && !strchr(fn, ':')) { +#else + if(fn[0] != '/') { +#endif /* The directory is a relative path or a filename. */ char *p;