index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2011-12-22 17:46:47 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-12-23 14:36:25 -0600 |
commit | d95c04945fc85bcc584026f7fded57dc8724ba6a (patch) | |
tree | 0c7b56c7164d37465406a4f8cddd70717e28d2c6 | |
parent | 67290441b80fa813a472767353095425c78805af (diff) |
-rw-r--r-- | src/pacman/conf.c | 12 |
diff --git a/src/pacman/conf.c b/src/pacman/conf.c index a4d115dd..a9f0de91 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -719,17 +719,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 == '[]' */ |