From bfaf1a132a0d528cfe1dae8cbb4f0ecdeccaa88d Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 29 Sep 2020 04:16:30 +0200 Subject: idevicebackup2: Don't fail on restore when source backup doesn't have any application info --- tools/idevicebackup2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools/idevicebackup2.c') 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) uint32_t applications_plist_xml_length = 0; plist_t applications_plist = plist_dict_get_item(info_plist, "Applications"); - if (applications_plist) { - plist_to_xml(applications_plist, &applications_plist_xml, &applications_plist_xml_length); + if (!applications_plist) { + printf("No Applications in Info.plist, skipping creation of RestoreApplications.plist\n"); + return 0; } + plist_to_xml(applications_plist, &applications_plist_xml, &applications_plist_xml_length); if (!applications_plist_xml) { printf("Error preparing RestoreApplications.plist\n"); goto leave; -- cgit v1.1-32-gdbae