summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/iphonebackup.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/iphonebackup.c b/tools/iphonebackup.c
index f7f1ff1..3fe3a3f 100644
--- a/tools/iphonebackup.c
+++ b/tools/iphonebackup.c
@@ -420,6 +420,9 @@ int main(int argc, char *argv[])
break;
}
+ /* reset backup status */
+ backup_ok = 0;
+
/* receive and save DLSendFile files and metadata, ACK each */
int file_index = 0;
uint64_t backup_real_size = 0;
@@ -600,13 +603,19 @@ int main(int argc, char *argv[])
printf("Storing Manifest.plist...\n");
plist_write_to_filename(manifest_plist, manifest_path, PLIST_FORMAT_XML);
}
-
- /* create: Status.plist (Info on how the backup process turned out) */
- printf("Backup Successful.\n");
- mobilebackup_write_status(backup_directory, 1);
+
+ backup_ok = 1;
}
}
+ if (backup_ok) {
+ /* create: Status.plist (Info on how the backup process turned out) */
+ printf("Backup Successful.\n");
+ mobilebackup_write_status(backup_directory, 1);
+ } else {
+ printf("Backup Failed.\n");
+ }
+
if (manifest_path)
g_free(manifest_path);