From 2a7c1de945a3ad0673655ba65c1a2d0ade87c733 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 12 Feb 2007 06:31:39 +0000 Subject: Wasn't clearing out the 'pkgname' variable, which was causing goofy output issues - silly me. Also removed config.rpath from CVS --- lib/libalpm/server.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/server.c') diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c index 51f389d9..b426ccb5 100644 --- a/lib/libalpm/server.c +++ b/lib/libalpm/server.c @@ -190,12 +190,15 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath, } /* Try to get JUST the name of the package from the filename */ - p = alpm_pkg_name_hasarch(fn); /* TODO remove this later */ - _alpm_pkg_splitname(fn, pkgname, NULL, (p != NULL)); + memset(pkgname, 0, PKG_NAME_LEN); + if((p = strstr(fn, PM_EXT_PKG))) { + _alpm_pkg_splitname(fn, pkgname, NULL, 1); + } if(!strlen(pkgname)) { /* just use the raw filename if we can't find crap */ - STRNCPY(pkgname, fn, PKG_NAME_LEN); + STRNCPY(pkgname, fn, PKG_NAME_LEN+1); } + _alpm_log(PM_LOG_DEBUG, _("using '%s' for download progress"), pkgname); snprintf(realfile, PATH_MAX, "%s/%s", localpath, fn); snprintf(output, PATH_MAX, "%s/%s.part", localpath, fn); -- cgit v1.2.3-54-g00ecf