1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-10-31 15:45:03 -04:00

Strip extension off all package compression types

Since we were searching for '.pkg.tar.gz' before, we now have started to
show extensions during the download when we have a '.pkg.tar.xz' package.
Just look for '.pkg.tar.' (or '.db.tar.') instead and suppress anything
found from that point on.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2010-03-18 21:46:03 -05:00
parent f6c7de77ed
commit ad4efa539d

View File

@ -570,7 +570,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
fname = strdup(filename);
/* strip package or DB extension for cleaner look */
if((p = strstr(fname, PKGEXT)) || (p = strstr(fname, DBEXT))) {
if((p = strstr(fname, ".pkg.tar.")) || (p = strstr(fname, ".db.tar."))) {
*p = '\0';
}
/* In order to deal with characters from all locales, we have to worry