summaryrefslogtreecommitdiffstats
path: root/tools/iphonebackup.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-25 15:40:47 +0100
committerGravatar Martin Szulecki2010-01-25 15:40:47 +0100
commit3e4694043b0767acede31102f403b4ee8cbb076e (patch)
tree569a69375a0aea6b2b4f55275ff1e0faa69477bd /tools/iphonebackup.c
parente5d42da1321fa6c29363c97188d7e6148083ae64 (diff)
downloadlibimobiledevice-3e4694043b0767acede31102f403b4ee8cbb076e.tar.gz
libimobiledevice-3e4694043b0767acede31102f403b4ee8cbb076e.tar.bz2
Use backup_ok to depict final backup success status in iphonebackup
Diffstat (limited to 'tools/iphonebackup.c')
-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);