diff options
author | Martin Szulecki | 2012-07-17 18:58:40 +0200 |
---|---|---|
committer | Nikias Bassen | 2012-07-17 18:58:40 +0200 |
commit | 75af79094956025f04fc55b0470bb4f4d875a64a (patch) | |
tree | 6a8a85f27f662dc7755b9166f788f93786bd9664 /src/restore.c | |
parent | 0d00fbe0f84ee50f534c7b8b5809b3870e12769d (diff) | |
download | idevicerestore-75af79094956025f04fc55b0470bb4f4d875a64a.tar.gz idevicerestore-75af79094956025f04fc55b0470bb4f4d875a64a.tar.bz2 |
restore: Error out if writing final personalized bbfw archive file failed
Diffstat (limited to 'src/restore.c')
-rw-r--r-- | src/restore.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); |