Use _alpm_local_db_pkgpath in _cache_changelog_open

Another place where we were doing the dirty work by hand.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-09-30 11:08:49 -05:00
parent b0543440ca
commit c4d6688694
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}
/**