xbps_remove_pkg: another missing rootdir check.
--HG-- extra : convert_revision : 1c2699c4d11073d49a01936c79a95968b0fb4b93
This commit is contained in:
parent
90b9325fbd
commit
1986dc93f3
1 changed files with 3 additions and 0 deletions
|
@ -292,6 +292,9 @@ xbps_remove_pkg(const char *pkgname, const char *version, bool update)
|
||||||
if (xbps_check_is_installed_pkgname(pkgname) == false)
|
if (xbps_check_is_installed_pkgname(pkgname) == false)
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
|
|
||||||
|
if (strcmp(rootdir, "") == 0)
|
||||||
|
rootdir = "/";
|
||||||
|
|
||||||
if (chdir(rootdir) == -1)
|
if (chdir(rootdir) == -1)
|
||||||
return errno;
|
return errno;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue