summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/add/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_install/add/main.c')
-rw-r--r--usr.sbin/pkg_install/add/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/add/main.c b/usr.sbin/pkg_install/add/main.c
index 2ebf912..92ea7bf 100644
--- a/usr.sbin/pkg_install/add/main.c
+++ b/usr.sbin/pkg_install/add/main.c
@@ -151,8 +151,10 @@ main(int argc, char **argv)
errx(1, "package name too long");
remotepkg = temppackageroot;
if (!((ptr = strrchr(remotepkg, '.')) && ptr[1] == 't' &&
- ptr[2] == 'g' && ptr[3] == 'z' && !ptr[4]))
- if (strlcat(remotepkg, ".tgz", sizeof(temppackageroot))
+ (ptr[2] == 'b' || ptr[2] == 'g') && ptr[3] == 'z' &&
+ !ptr[4]))
+ /* XXX: need to handle .tgz also */
+ if (strlcat(remotepkg, ".tbz", sizeof(temppackageroot))
>= sizeof(temppackageroot))
errx(1, "package name too long");
}
OpenPOWER on IntegriCloud