xbps_configure_pkg: chdir(rootdir) before checking for INSTALL script!

--HG--
extra : convert_revision : xtraeme%40gmail.com-20090818213947-kl9f5gfbcq8vwvvt
This commit is contained in:
Juan RP 2009-08-18 23:39:47 +02:00
parent 5a2348e502
commit d7ff3ea85a

View File

@ -76,13 +76,13 @@ xbps_configure_pkg(const char *pkgname)
if (buf == NULL)
return errno;
if (access(buf, R_OK) == 0) {
if (strcmp(rootdir, "") == 0)
rootdir = "/";
if (chdir(rootdir) == -1)
return errno;
if (access(buf, R_OK) == 0) {
if ((rv = xbps_file_chdir_exec(rootdir, buf, "post",
pkgname, version, NULL)) != 0) {
free(buf);