Fix xbps-bin install without using a rootdir.
--HG-- extra : convert_revision : 7d9b697caa3f6d5c8b3d07462093c33c7fbfea29
This commit is contained in:
parent
350566818c
commit
a5829d5467
2 changed files with 6 additions and 0 deletions
|
@ -70,6 +70,9 @@ xbps_configure_pkg(const char *pkgname, const char *version)
|
|||
return errno;
|
||||
|
||||
if (access(buf, R_OK) == 0) {
|
||||
if (strcmp(rootdir, "") == 0)
|
||||
rootdir = "/";
|
||||
|
||||
if (chdir(rootdir) == -1)
|
||||
return errno;
|
||||
|
||||
|
|
|
@ -141,6 +141,9 @@ unpack_archive_fini(struct archive *ar, prop_dictionary_t pkg,
|
|||
rootdir = xbps_get_rootdir();
|
||||
flags = xbps_get_flags();
|
||||
|
||||
if (strcmp(rootdir, "") == 0)
|
||||
rootdir = "/";
|
||||
|
||||
if (chdir(rootdir) == -1)
|
||||
return errno;
|
||||
|
||||
|
|
Loading…
Reference in a new issue