Simplify previous.
--HG-- extra : convert_revision : c93b6612845c64f9b9b929150014a76d6584ec1c
This commit is contained in:
parent
d5d280a93c
commit
500cfe4b4f
2 changed files with 4 additions and 15 deletions
|
@ -143,13 +143,8 @@ unpack_archive_fini(struct archive *ar, prop_dictionary_t pkg)
|
|||
if (strcmp(rootdir, "") == 0)
|
||||
rootdir = "/";
|
||||
|
||||
if (rootdir) {
|
||||
if (chdir(rootdir) == -1)
|
||||
return errno;
|
||||
} else {
|
||||
if (chdir("/") == -1)
|
||||
return errno;
|
||||
}
|
||||
if (chdir(rootdir) == -1)
|
||||
return errno;
|
||||
|
||||
prop_dictionary_get_cstring_nocopy(pkg, "pkgname", &pkgname);
|
||||
prop_dictionary_get_cstring_nocopy(pkg, "version", &version);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue