diff options
author | Nikias Bassen | 2022-06-27 03:28:14 +0200 |
---|---|---|
committer | Nikias Bassen | 2022-06-27 03:28:14 +0200 |
commit | 20ad9782f1cbe6b777bd5a1878ff6c6da47e5aa3 (patch) | |
tree | 4b1105d17d0a823d7b1ad9b5348639cc038a1fe5 /src | |
parent | efd00b498ec4571c186abf9bf9f32d6f3eb7c143 (diff) | |
download | idevicerestore-20ad9782f1cbe6b777bd5a1878ff6c6da47e5aa3.tar.gz idevicerestore-20ad9782f1cbe6b777bd5a1878ff6c6da47e5aa3.tar.bz2 |
ipsw: Add workaround for missing RestoreBehavior entries for ipsw info
Diffstat (limited to 'src')
-rw-r--r-- | src/ipsw.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -201,7 +201,15 @@ int ipsw_print_info(const char* path) if (!group) { group = plist_new_dict(); node = plist_access_path(build_identity, 2, "Info", "RestoreBehavior"); - plist_dict_set_item(group, "RestoreBehavior", plist_copy(node)); + if (node) { + plist_dict_set_item(group, "RestoreBehavior", plist_copy(node)); + } else { + if (strstr(variant_str, "Upgrade")) { + plist_dict_set_item(group, "RestoreBehavior", plist_new_string("Update")); + } else if (strstr(variant_str, "Erase")) { + plist_dict_set_item(group, "RestoreBehavior", plist_new_string("Erase")); + } + } entries = plist_new_array(); plist_dict_set_item(group, "Entries", entries); plist_dict_set_item(build_ids_grouped, variant_str, group); |