diff options
author | Martin Szulecki | 2010-01-25 15:41:40 +0100 |
---|---|---|
committer | Martin Szulecki | 2010-01-25 15:41:40 +0100 |
commit | 33a7e44b20f44adafe663d11dc36f704b248f3f2 (patch) | |
tree | 858d9c8c9d9e2ad2439952628ad5bd07c46c8b25 /tools | |
parent | 3e4694043b0767acede31102f403b4ee8cbb076e (diff) | |
download | libimobiledevice-33a7e44b20f44adafe663d11dc36f704b248f3f2.tar.gz libimobiledevice-33a7e44b20f44adafe663d11dc36f704b248f3f2.tar.bz2 |
Improve check for BackupTotalSizeKey and improve message reporting total size
Diffstat (limited to 'tools')
-rw-r--r-- | tools/iphonebackup.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/iphonebackup.c b/tools/iphonebackup.c index 3fe3a3f..2628871 100644 --- a/tools/iphonebackup.c +++ b/tools/iphonebackup.c @@ -445,10 +445,12 @@ int main(int argc, char *argv[]) /* first message contains total backup size */ if (file_index == 0) { node = plist_dict_get_item(node_tmp, "BackupTotalSizeKey"); - plist_get_uint_val(node, &backup_total_size); - format_size = g_format_size_for_display(backup_total_size); - printf("Backup will need %s on disk.\n", format_size); - g_free(format_size); + if (node) { + plist_get_uint_val(node, &backup_total_size); + format_size = g_format_size_for_display(backup_total_size); + printf("Backup data requires %s on the disk.\n", format_size); + g_free(format_size); + } } /* print out "received" if DLFileStatusKey is 2 (last file piece) */ |