From af888c534b7c106ba89069ef6b11ea63d9f24975 Mon Sep 17 00:00:00 2001 From: VMiklos Date: Thu, 31 May 2007 15:21:33 -0400 Subject: alpm_parse_config(): ignore #.*$, not just ^#.*$ Signed-off-by: Dan McGee --- lib/libalpm/alpm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index ff180210..d0f87462 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -909,6 +909,9 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const if(strlen(line) == 0 || line[0] == '#') { continue; } + if((ptr = strchr(line, '#'))) { + *ptr = '\0'; + } if(line[0] == '[' && line[strlen(line)-1] == ']') { /* new config section */ ptr = line; -- cgit v1.2.3