From 8dd59522c788332a54fa85bee2ae3d0d7fee01b0 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 27 Apr 2011 15:00:11 +0200 Subject: idevicebackup2: Normalize code of backup/restore aborting due to incompatible backup --- tools/idevicebackup2.c | 14 ++------------ 1 file 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[]) printf("Could not read Info.plist\n"); is_full_backup = 1; } - if (info_plist && (cmd == CMD_BACKUP)) { - if (mobilebackup_info_is_current_device(info_plist)) { - /* update the last backup time within Info.plist */ - //mobilebackup_info_update_last_backup_date(info_plist); - //remove(info_path); - //plist_write_to_filename(info_plist, info_path, PLIST_FORMAT_XML); - } else { - printf("Aborting backup. Backup is not compatible with the current device.\n"); - cmd = CMD_LEAVE; - } - } else if (info_plist && (cmd == CMD_RESTORE)) { + if (info_plist && ((cmd == CMD_BACKUP) || (cmd == CMD_RESTORE))) { if (!mobilebackup_info_is_current_device(info_plist)) { - printf("Aborting restore. Backup data is not compatible with the current device.\n"); + printf("Aborting. Backup data is not compatible with the current device.\n"); cmd = CMD_LEAVE; } } -- cgit v1.1-32-gdbae