diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ideviceinstaller.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c index 1d3f383..79961e1 100644 --- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c | |||
| @@ -633,7 +633,6 @@ run_again: | |||
| 633 | free(zbuf); | 633 | free(zbuf); |
| 634 | } | 634 | } |
| 635 | 635 | ||
| 636 | /* we need to get the CFBundleName first */ | ||
| 637 | plist_t info = NULL; | 636 | plist_t info = NULL; |
| 638 | zbuf = NULL; | 637 | zbuf = NULL; |
| 639 | len = 0; | 638 | len = 0; |
| @@ -693,27 +692,27 @@ run_again: | |||
| 693 | goto leave_cleanup; | 692 | goto leave_cleanup; |
| 694 | } | 693 | } |
| 695 | 694 | ||
| 696 | char *bundlename = NULL; | 695 | char *bundleexecutable = NULL; |
| 697 | 696 | ||
| 698 | plist_t bname = plist_dict_get_item(info, "CFBundleName"); | 697 | plist_t bname = plist_dict_get_item(info, "CFBundleExecutable"); |
| 699 | if (bname) { | 698 | if (bname) { |
| 700 | plist_get_string_val(bname, &bundlename); | 699 | plist_get_string_val(bname, &bundleexecutable); |
| 701 | } | 700 | } |
| 702 | plist_free(info); | 701 | plist_free(info); |
| 703 | 702 | ||
| 704 | if (!bundlename) { | 703 | if (!bundleexecutable) { |
| 705 | fprintf(stderr, "Could not determine CFBundleName!\n"); | 704 | fprintf(stderr, "Could not determine value for CFBundleExecutable!\n"); |
| 706 | zip_unchange_all(zf); | 705 | zip_unchange_all(zf); |
| 707 | zip_close(zf); | 706 | zip_close(zf); |
| 708 | goto leave_cleanup; | 707 | goto leave_cleanup; |
| 709 | } | 708 | } |
| 710 | 709 | ||
| 711 | char *sinfname = NULL; | 710 | char *sinfname = NULL; |
| 712 | if (asprintf(&sinfname, "Payload/%s.app/SC_Info/%s.sinf", bundlename, bundlename) < 0) { | 711 | if (asprintf(&sinfname, "Payload/%s.app/SC_Info/%s.sinf", bundleexecutable, bundleexecutable) < 0) { |
| 713 | fprintf(stderr, "Out of memory!?\n"); | 712 | fprintf(stderr, "Out of memory!?\n"); |
| 714 | goto leave_cleanup; | 713 | goto leave_cleanup; |
| 715 | } | 714 | } |
| 716 | free(bundlename); | 715 | free(bundleexecutable); |
| 717 | 716 | ||
| 718 | /* extract .sinf from package */ | 717 | /* extract .sinf from package */ |
| 719 | zbuf = NULL; | 718 | zbuf = NULL; |
