alpm_parse_config(): ignore #.*$, not just ^#.*$

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
VMiklos 2007-05-31 15:21:33 -04:00 committed by Dan McGee
parent e422b71a48
commit af888c534b

View file

@ -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;