summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup2.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-01-31 14:25:05 +0100
committerGravatar Nikias Bassen2014-01-31 14:25:05 +0100
commitd526a089b39e829d565e7f8ddc5b0714eee5b45b (patch)
tree3f275a2b0056bfce80c0792e920fe4c0f0fb82f7 /tools/idevicebackup2.c
parentb3e2954930f99e450cd944517fe3577aba176645 (diff)
downloadlibimobiledevice-d526a089b39e829d565e7f8ddc5b0714eee5b45b.tar.gz
libimobiledevice-d526a089b39e829d565e7f8ddc5b0714eee5b45b.tar.bz2
idevicebackup2: allow unbacking encrypted backups (given the password)
Diffstat (limited to 'tools/idevicebackup2.c')
-rw-r--r--tools/idevicebackup2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index 353d5f3..ecec5df 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -1538,7 +1538,7 @@ int main(int argc, char *argv[])
} else if (cmd != CMD_CLOUD) {
/* backup directory must contain an Info.plist */
info_path = build_path(backup_directory, source_udid, "Info.plist", NULL);
- if (cmd == CMD_RESTORE) {
+ if (cmd == CMD_RESTORE || cmd == CMD_UNBACK) {
if (stat(info_path, &st) != 0) {
free(info_path);
printf("ERROR: Backup directory \"%s\" is invalid. No Info.plist found for UDID %s.\n", backup_directory, source_udid);
@@ -1577,7 +1577,11 @@ int main(int argc, char *argv[])
free(backup_password);
}
idevice_free(device);
- printf("ERROR: a backup password is required to restore an encrypted backup. Cannot continue.\n");
+ if (cmd == CMD_RESTORE) {
+ printf("ERROR: a backup password is required to restore an encrypted backup. Cannot continue.\n");
+ } else if (cmd == CMD_UNBACK) {
+ printf("ERROR: a backup password is required to unback an encrypted backup. Cannot continue.\n");
+ }
return -1;
}
}