pactree: allow comments after repo section header

Duplicate the fix in config file parsing from d95c0494.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2012-02-11 17:30:23 +10:00 committed by Dan McGee
parent 31432edcbe
commit 294f0fdf4d
1 changed files with 7 additions and 7 deletions

View File

@ -167,15 +167,15 @@ static int register_syncs(void) {
}
while(fgets(line, LINE_MAX, fp)) {
strtrim(line);
if(line[0] == '#' || !strlen(line)) {
continue;
}
/* ignore whole line and end of line comments */
if((ptr = strchr(line, '#'))) {
*ptr = '\0';
strtrim(line);
}
strtrim(line);
if(strlen(line) == 0) {
continue;
}
if(line[0] == '[' && line[strlen(line) - 1] == ']') {