summaryrefslogtreecommitdiffstats
path: root/src/ideviceinstaller.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2010-04-01 23:43:36 +0200
committerGravatar Martin Szulecki2010-04-02 00:07:01 +0200
commitec433d15c38649e6ae06d686579fd5025d96f004 (patch)
tree1c442786449d54a99dd93f2b7dba25f9a9e8b012 /src/ideviceinstaller.c
parent76de20d18914577936e6cfce1747c04b4facb78b (diff)
downloadideviceinstaller-ec433d15c38649e6ae06d686579fd5025d96f004.tar.gz
ideviceinstaller-ec433d15c38649e6ae06d686579fd5025d96f004.tar.bz2
Don't bail out when a file is missing
Diffstat (limited to 'src/ideviceinstaller.c')
-rw-r--r--src/ideviceinstaller.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index d13fdb9..86c6fe7 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -520,13 +520,12 @@ run_again:
/* extract iTunesMetadata.plist from package */
char *zbuf = NULL;
uint32_t len = 0;
- if (zip_f_get_contents(zf, "iTunesMetadata.plist", 0, &zbuf, &len) < 0) {
- zip_unchange_all(zf);
- zip_close(zf);
- goto leave_cleanup;
+ if (zip_f_get_contents(zf, "iTunesMetadata.plist", 0, &zbuf, &len) == 0) {
+ meta = plist_new_data(zbuf, len);
+ }
+ if (zbuf) {
+ free(zbuf);
}
- meta = plist_new_data(zbuf, len);
- free(zbuf);
/* we need to get the CFBundleName first */
plist_t info = NULL;