From ec433d15c38649e6ae06d686579fd5025d96f004 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 1 Apr 2010 23:43:36 +0200 Subject: Don't bail out when a file is missing --- src/ideviceinstaller.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') 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; -- cgit v1.1-32-gdbae