diff options
author | Dan McGee <dan@archlinux.org> | 2011-12-23 14:40:59 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-12-23 14:40:59 -0600 |
commit | 38143770a9a1b4b88503fc7b1b9098a5957e0f4e (patch) | |
tree | a2633ffc7acdb22ef9f1fdb2f87d87757aae1799 /src/pacman | |
parent | aac639351f1eb56c1f8f6f19bfe438400a02c614 (diff) | |
parent | 5b749eeee999b5b332ad7545688297a37542b9a5 (diff) |
Merge branch 'maint'
Diffstat (limited to 'src/pacman')
-rw-r--r-- | src/pacman/conf.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 6703243a..117aecd4 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -720,17 +720,19 @@ static int _parseconfig(const char *file, struct section_t *section, size_t line_len; linenum++; - strtrim(line); - line_len = strlen(line); /* ignore whole line and end of line comments */ - if(line_len == 0 || line[0] == '#') { - continue; - } if((ptr = strchr(line, '#'))) { *ptr = '\0'; } + strtrim(line); + line_len = strlen(line); + + if(line_len == 0) { + continue; + } + if(line[0] == '[' && line[line_len - 1] == ']') { char *name; /* only possibility here is a line == '[]' */ |