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[])
}
}
+ /* Manifest.plist (backup manifest (backup state)) */
+ char *manifest_path = mobilebackup_build_path(backup_directory, "Manifest", ".plist");
+
switch(cmd) {
case CMD_BACKUP:
printf("Starting backup...\n");
/* TODO: check domain com.apple.mobile.backup key RequiresEncrypt and WillEncrypt with lockdown */
/* TODO: verify battery on AC enough battery remaining */
- /* Manifest.plist (backup manifest (backup state)) */
- char *manifest_path = mobilebackup_build_path(backup_directory, "Manifest", ".plist");
-
/* read the last Manifest.plist */
if (!is_full_backup) {
printf("Reading existing Manifest.\n");
@@ -866,10 +866,6 @@ int main(int argc, char *argv[])
} else {
printf("Backup Failed.\n");
}
-
- if (manifest_path)
- g_free(manifest_path);
-
break;
case CMD_RESTORE:
/* TODO: verify battery on AC enough battery remaining */
@@ -902,6 +898,8 @@ int main(int argc, char *argv[])
lockfile = 0;
do_post_notification(NP_SYNC_DID_FINISH);
}
+ if (manifest_path)
+ g_free(manifest_path);
} else {
printf("ERROR: Could not start service %s.\n", MOBILEBACKUP_SERVICE_NAME);
lockdownd_client_free(client);