pkg: fix regression that breaks bootstrap from not a current directory.

Fixes:		40b9f924b1
Reviewed by:	kevans
This commit is contained in:
Gleb Smirnoff 2021-09-10 14:49:17 -07:00
parent 141fe2dcee
commit c96b4d87ba

View File

@ -1063,9 +1063,13 @@ bootstrap_pkg_local(const char *pkgpath, bool force)
static bool
pkg_is_pkg_pkg(const char *pkg)
{
char *vstart;
char *vstart, *basename;
size_t namelen;
/* Strip path. */
if ((basename = strrchr(pkg, '/')) != NULL)
pkg = basename + 1;
/*
* Chop off the final "-" (version delimiter) and check the name that
* precedes it. If we didn't have a version delimiter, it must be the