summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2010-06-04 13:12:33 +0200
committerGravatar Nikias Bassen2010-06-04 13:12:33 +0200
commit54340f40090ce73d524821e5b724e37f0da9733b (patch)
tree074273a9b121df07b20f190f04f60cf4c02432cd /tools
parent6586d0b91b67ed47eb79e7bfdf830de5f681c4fa (diff)
downloadlibimobiledevice-54340f40090ce73d524821e5b724e37f0da9733b.tar.gz
libimobiledevice-54340f40090ce73d524821e5b724e37f0da9733b.tar.bz2
idevicebackup: use manifest_path for restore too
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicebackup.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c
index cacacc4..b3b073a 100644
--- a/tools/idevicebackup.c
+++ b/tools/idevicebackup.c
@@ -594,15 +594,15 @@ int main(int argc, char *argv[])
594 } 594 }
595 } 595 }
596 596
597 /* Manifest.plist (backup manifest (backup state)) */
598 char *manifest_path = mobilebackup_build_path(backup_directory, "Manifest", ".plist");
599
597 switch(cmd) { 600 switch(cmd) {
598 case CMD_BACKUP: 601 case CMD_BACKUP:
599 printf("Starting backup...\n"); 602 printf("Starting backup...\n");
600 /* TODO: check domain com.apple.mobile.backup key RequiresEncrypt and WillEncrypt with lockdown */ 603 /* TODO: check domain com.apple.mobile.backup key RequiresEncrypt and WillEncrypt with lockdown */
601 /* TODO: verify battery on AC enough battery remaining */ 604 /* TODO: verify battery on AC enough battery remaining */
602 605
603 /* Manifest.plist (backup manifest (backup state)) */
604 char *manifest_path = mobilebackup_build_path(backup_directory, "Manifest", ".plist");
605
606 /* read the last Manifest.plist */ 606 /* read the last Manifest.plist */
607 if (!is_full_backup) { 607 if (!is_full_backup) {
608 printf("Reading existing Manifest.\n"); 608 printf("Reading existing Manifest.\n");
@@ -866,10 +866,6 @@ int main(int argc, char *argv[])
866 } else { 866 } else {
867 printf("Backup Failed.\n"); 867 printf("Backup Failed.\n");
868 } 868 }
869
870 if (manifest_path)
871 g_free(manifest_path);
872
873 break; 869 break;
874 case CMD_RESTORE: 870 case CMD_RESTORE:
875 /* TODO: verify battery on AC enough battery remaining */ 871 /* TODO: verify battery on AC enough battery remaining */
@@ -902,6 +898,8 @@ int main(int argc, char *argv[])
902 lockfile = 0; 898 lockfile = 0;
903 do_post_notification(NP_SYNC_DID_FINISH); 899 do_post_notification(NP_SYNC_DID_FINISH);
904 } 900 }
901 if (manifest_path)
902 g_free(manifest_path);
905 } else { 903 } else {
906 printf("ERROR: Could not start service %s.\n", MOBILEBACKUP_SERVICE_NAME); 904 printf("ERROR: Could not start service %s.\n", MOBILEBACKUP_SERVICE_NAME);
907 lockdownd_client_free(client); 905 lockdownd_client_free(client);