diff options
author | Nikias Bassen | 2010-11-27 23:15:26 +0100 |
---|---|---|
committer | Martin Szulecki | 2011-04-11 19:42:18 +0200 |
commit | 2d3e75d205fa0755d99217881c4610f7a2229d94 (patch) | |
tree | 9d2facae236981699ea99c2e7a6eced8db742ecf /tools | |
parent | 5eefa4828535a905f9af5fd7ea0ad00b2f955103 (diff) | |
download | libimobiledevice-2d3e75d205fa0755d99217881c4610f7a2229d94.tar.gz libimobiledevice-2d3e75d205fa0755d99217881c4610f7a2229d94.tar.bz2 |
idevicebackup4: only write PhoneNumber key in Info.plist if present
Diffstat (limited to 'tools')
-rw-r--r-- | tools/idevicebackup4.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/idevicebackup4.c b/tools/idevicebackup4.c index c2e067d..1a9a9ea 100644 --- a/tools/idevicebackup4.c +++ b/tools/idevicebackup4.c @@ -289,7 +289,9 @@ static plist_t mobilebackup_factory_info_plist_new() plist_dict_insert_item(ret, "Last Backup Date", plist_new_date(tv.tv_sec, tv.tv_usec)); value_node = plist_dict_get_item(root_node, "PhoneNumber"); - plist_dict_insert_item(ret, "Phone Number", plist_copy(value_node)); + if (value_node && (plist_get_node_type(value_node) == PLIST_STRING)) { + plist_dict_insert_item(ret, "Phone Number", plist_copy(value_node)); + } value_node = plist_dict_get_item(root_node, "ProductType"); plist_dict_insert_item(ret, "Product Type", plist_copy(value_node)); |