diff options
author | VMiklos <vmiklos@frugalware.org> | 2007-05-31 21:21:33 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-05-31 21:21:33 +0200 |
commit | af888c534b7c106ba89069ef6b11ea63d9f24975 (patch) | |
tree | cb9463e6ffc76747a073c9473b3319e6b3e91634 | |
parent | e422b71a48c9f7637595c510d8766f0f38b1114e (diff) | |
download | pacman-af888c534b7c106ba89069ef6b11ea63d9f24975.tar.gz pacman-af888c534b7c106ba89069ef6b11ea63d9f24975.tar.xz |
alpm_parse_config(): ignore #.*$, not just ^#.*$
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | lib/libalpm/alpm.c | 3 |
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; |