index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | src/pacman/conf.c | 12 |
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 == '[]' */ |