diff options
| author | 2020-09-29 04:16:30 +0200 | |
|---|---|---|
| committer | 2020-09-29 04:16:30 +0200 | |
| commit | bfaf1a132a0d528cfe1dae8cbb4f0ecdeccaa88d (patch) | |
| tree | bcd7f5b41eb63d2fc2e12901eb2625619beb5c2f /tools/idevicebackup2.c | |
| parent | 98056a89648f431759c5fa4ed87c6ea6ba0cdd3f (diff) | |
| download | libimobiledevice-bfaf1a132a0d528cfe1dae8cbb4f0ecdeccaa88d.tar.gz libimobiledevice-bfaf1a132a0d528cfe1dae8cbb4f0ecdeccaa88d.tar.bz2 | |
idevicebackup2: Don't fail on restore when source backup doesn't have any application info
Diffstat (limited to 'tools/idevicebackup2.c')
| -rw-r--r-- | tools/idevicebackup2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 9bbb311..a9450ae 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c | |||
| @@ -548,9 +548,11 @@ static int write_restore_applications(plist_t info_plist, afc_client_t afc) | |||
| 548 | uint32_t applications_plist_xml_length = 0; | 548 | uint32_t applications_plist_xml_length = 0; |
| 549 | 549 | ||
| 550 | plist_t applications_plist = plist_dict_get_item(info_plist, "Applications"); | 550 | plist_t applications_plist = plist_dict_get_item(info_plist, "Applications"); |
| 551 | if (applications_plist) { | 551 | if (!applications_plist) { |
| 552 | plist_to_xml(applications_plist, &applications_plist_xml, &applications_plist_xml_length); | 552 | printf("No Applications in Info.plist, skipping creation of RestoreApplications.plist\n"); |
| 553 | return 0; | ||
| 553 | } | 554 | } |
| 555 | plist_to_xml(applications_plist, &applications_plist_xml, &applications_plist_xml_length); | ||
| 554 | if (!applications_plist_xml) { | 556 | if (!applications_plist_xml) { |
| 555 | printf("Error preparing RestoreApplications.plist\n"); | 557 | printf("Error preparing RestoreApplications.plist\n"); |
| 556 | goto leave; | 558 | goto leave; |
