summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/iphonebackup.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/iphonebackup.c b/tools/iphonebackup.c
index f7be8ca..28a8949 100644
--- a/tools/iphonebackup.c
+++ b/tools/iphonebackup.c
@@ -464,14 +464,15 @@ int main(int argc, char *argv[])
is_manifest = FALSE;
if (c == 2) {
- node = plist_dict_get_item(node_tmp, "DLFileAttributesKey");
- node = plist_dict_get_item(node, "FileSize");
- plist_get_uint_val(node, &length);
-
/* increased received size for each completed file */
- backup_real_size += length;
-
if (!is_manifest) {
+ node = plist_dict_get_item(node_tmp, "DLFileAttributesKey");
+ node = plist_dict_get_item(node, "FileSize");
+ plist_get_uint_val(node, &length);
+
+ backup_real_size += length;
+ file_index++;
+
format_size = g_format_size_for_display(backup_real_size);
printf("(%s", format_size);
g_free(format_size);
@@ -543,8 +544,6 @@ int main(int argc, char *argv[])
plist_free(message);
message = NULL;
-
- file_index++;
} while (!plist_strcmp(node, "DLSendFile"));
printf("Received %d files from device.\n", file_index);