Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/be_local.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 88ecec0c..56cf38bb 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -173,11 +173,11 @@ static alpm_list_t *_cache_get_backup(alpm_pkg_t *pkg)
*/
static void *_cache_changelog_open(alpm_pkg_t *pkg)
{
- char clfile[PATH_MAX];
alpm_db_t *db = alpm_pkg_get_db(pkg);
- snprintf(clfile, PATH_MAX, "%s/%s/%s-%s/changelog",
- pkg->handle->dbpath, db->treename, pkg->name, pkg->version);
- return fopen(clfile, "r");
+ char *clfile = _alpm_local_db_pkgpath(db, pkg, "changelog");
+ FILE *f = fopen(clfile, "r");
+ free(clfile);
+ return f;
}
/**