From bf7ca100f607dd6c9a8896c99c855be6b237d8a2 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 28 Nov 2009 02:49:36 +0100 Subject: [PATCH] xbps_unpack_binary_pkg: cosmetic changes. --HG-- extra : convert_revision : xtraeme%40gmail.com-20091128014936-0k9pmxox7igtlfmn --- lib/unpack.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/unpack.c b/lib/unpack.c index 751b25f3..fe328ec5 100644 --- a/lib/unpack.c +++ b/lib/unpack.c @@ -74,12 +74,11 @@ xbps_unpack_binary_pkg(prop_dictionary_t pkg, bool essential) ARCHIVE_READ_BLOCKSIZE)) != 0) goto out; - rv = unpack_archive_fini(ar, pkg, essential); - /* - * If installation of package was successful, make sure the package - * is really on storage (if possible). - */ - if (rv == 0) { + if ((rv = unpack_archive_fini(ar, pkg, essential)) == 0) { + /* + * If installation of package was successful, make sure + * its files are written in storage (if possible). + */ if (fsync(pkg_fd) == -1) { rv = errno; goto out;