summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-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[])
1538 } else if (cmd != CMD_CLOUD) { 1538 } else if (cmd != CMD_CLOUD) {
1539 /* backup directory must contain an Info.plist */ 1539 /* backup directory must contain an Info.plist */
1540 info_path = build_path(backup_directory, source_udid, "Info.plist", NULL); 1540 info_path = build_path(backup_directory, source_udid, "Info.plist", NULL);
1541 if (cmd == CMD_RESTORE) { 1541 if (cmd == CMD_RESTORE || cmd == CMD_UNBACK) {
1542 if (stat(info_path, &st) != 0) { 1542 if (stat(info_path, &st) != 0) {
1543 free(info_path); 1543 free(info_path);
1544 printf("ERROR: Backup directory \"%s\" is invalid. No Info.plist found for UDID %s.\n", backup_directory, source_udid); 1544 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[])
1577 free(backup_password); 1577 free(backup_password);
1578 } 1578 }
1579 idevice_free(device); 1579 idevice_free(device);
1580 printf("ERROR: a backup password is required to restore an encrypted backup. Cannot continue.\n"); 1580 if (cmd == CMD_RESTORE) {
1581 printf("ERROR: a backup password is required to restore an encrypted backup. Cannot continue.\n");
1582 } else if (cmd == CMD_UNBACK) {
1583 printf("ERROR: a backup password is required to unback an encrypted backup. Cannot continue.\n");
1584 }
1581 return -1; 1585 return -1;
1582 } 1586 }
1583 } 1587 }