index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2007-02-12 06:31:39 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-02-12 06:31:39 +0000 |
commit | 2a7c1de945a3ad0673655ba65c1a2d0ade87c733 (patch) | |
tree | bca639bd255b5f96c7a2677820eda54465957460 /lib | |
parent | f319dc080d73ef7f43b603aae0a32a6e77328303 (diff) |
-rw-r--r-- | lib/libalpm/server.c | 9 |
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); |