summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2011-04-27 15:00:11 +0200
committerGravatar Martin Szulecki2011-04-27 15:00:11 +0200
commit8dd59522c788332a54fa85bee2ae3d0d7fee01b0 (patch)
treef5d103766c72fdd2e9a5f74c99c84d48b78de392
parent88a5b03233ad95a0ccb3449a656f637ccde453ce (diff)
downloadlibimobiledevice-8dd59522c788332a54fa85bee2ae3d0d7fee01b0.tar.gz
libimobiledevice-8dd59522c788332a54fa85bee2ae3d0d7fee01b0.tar.bz2
idevicebackup2: Normalize code of backup/restore aborting due to incompatible backup
-rw-r--r--tools/idevicebackup2.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index 113180b..c443826 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -1258,19 +1258,9 @@ int main(int argc, char *argv[])
1258 printf("Could not read Info.plist\n"); 1258 printf("Could not read Info.plist\n");
1259 is_full_backup = 1; 1259 is_full_backup = 1;
1260 } 1260 }
1261 if (info_plist && (cmd == CMD_BACKUP)) { 1261 if (info_plist && ((cmd == CMD_BACKUP) || (cmd == CMD_RESTORE))) {
1262 if (mobilebackup_info_is_current_device(info_plist)) {
1263 /* update the last backup time within Info.plist */
1264 //mobilebackup_info_update_last_backup_date(info_plist);
1265 //remove(info_path);
1266 //plist_write_to_filename(info_plist, info_path, PLIST_FORMAT_XML);
1267 } else {
1268 printf("Aborting backup. Backup is not compatible with the current device.\n");
1269 cmd = CMD_LEAVE;
1270 }
1271 } else if (info_plist && (cmd == CMD_RESTORE)) {
1272 if (!mobilebackup_info_is_current_device(info_plist)) { 1262 if (!mobilebackup_info_is_current_device(info_plist)) {
1273 printf("Aborting restore. Backup data is not compatible with the current device.\n"); 1263 printf("Aborting. Backup data is not compatible with the current device.\n");
1274 cmd = CMD_LEAVE; 1264 cmd = CMD_LEAVE;
1275 } 1265 }
1276 } 1266 }