mirror of
https://github.com/moparisthebest/pacman
synced 2024-10-31 15:45:03 -04:00
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:
parent
31432edcbe
commit
294f0fdf4d
@ -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] == ']') {
|
||||
|
Loading…
Reference in New Issue
Block a user