alpm_parse_config(): ignore #.*$, not just ^#.*$
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
e422b71a48
commit
af888c534b
1 changed files with 3 additions and 0 deletions
|
@ -909,6 +909,9 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const
|
||||||
if(strlen(line) == 0 || line[0] == '#') {
|
if(strlen(line) == 0 || line[0] == '#') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if((ptr = strchr(line, '#'))) {
|
||||||
|
*ptr = '\0';
|
||||||
|
}
|
||||||
if(line[0] == '[' && line[strlen(line)-1] == ']') {
|
if(line[0] == '[' && line[strlen(line)-1] == ']') {
|
||||||
/* new config section */
|
/* new config section */
|
||||||
ptr = line;
|
ptr = line;
|
||||||
|
|
Loading…
Add table
Reference in a new issue