index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2016-06-06 20:12:30 +0200 |
---|---|---|
committer | Andrew Gregory <andrew.gregory.8@gmail.com> | 2017-05-08 23:27:41 -0400 |
commit | 8abb0cbf0e76bc9e59aa58b368ca11a2f0c189f2 (patch) | |
tree | 29bed21bbaba10aeac3f34a54aea0e2e672e25dd /lib/libalpm/add.c | |
parent | e03c5392883a39be1bf46a4d5811d2c46359d196 (diff) |
-rw-r--r-- | lib/libalpm/add.c | 5 |
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index f5c9a957..d132e522 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -466,7 +466,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg, } } - /* prepare directory for database entries so permission are correct after + /* prepare directory for database entries so permissions are correct after changelog/install script installation */ if(_alpm_local_db_prepare(db, newpkg)) { alpm_logaction(handle, ALPM_CALLER_PREFIX, @@ -503,6 +503,9 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg, _alpm_log(handle, ALPM_LOG_ERROR, _("could not change directory to %s (%s)\n"), handle->root, strerror(errno)); _alpm_archive_read_free(archive); + if(cwdfd >= 0) { + close(cwdfd); + } close(fd); ret = -1; goto cleanup; |