summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
authorVMiklos <vmiklos@frugalware.org>2007-05-31 15:21:33 -0400
committerDan McGee <dan@archlinux.org>2007-05-31 15:21:33 -0400
commitaf888c534b7c106ba89069ef6b11ea63d9f24975 (patch)
treecb9463e6ffc76747a073c9473b3319e6b3e91634 /lib/libalpm/alpm.c
parente422b71a48c9f7637595c510d8766f0f38b1114e (diff)
downloadpacman-af888c534b7c106ba89069ef6b11ea63d9f24975.tar.xz
alpm_parse_config(): ignore #.*$, not just ^#.*$
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c3
1 files changed, 3 insertions, 0 deletions
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;