From 75af79094956025f04fc55b0470bb4f4d875a64a Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 17 Jul 2012 18:58:40 +0200 Subject: restore: Error out if writing final personalized bbfw archive file failed --- src/restore.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/restore.c') diff --git a/src/restore.c b/src/restore.c index 2280095..49c487d 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1208,12 +1208,15 @@ static int restore_sign_bbfw(const char* bbfwtmp, plist_t bbtss, const char* bb_ } // this will write out the modified zip - zip_close(za); + if (zip_close(za) == -1) { + error("ERROR: could not close and write modified archive: %s\n", zip_strerror(za)); + res = -1; + } else { + res = 0; + } za = NULL; zs = NULL; - res = 0; - leave: if (mbn) { mbn_free(mbn); -- cgit v1.1-32-gdbae