summaryrefslogtreecommitdiffstats
path: root/tools
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 /tools
parent88a5b03233ad95a0ccb3449a656f637ccde453ce (diff)
downloadlibimobiledevice-8dd59522c788332a54fa85bee2ae3d0d7fee01b0.tar.gz
libimobiledevice-8dd59522c788332a54fa85bee2ae3d0d7fee01b0.tar.bz2
idevicebackup2: Normalize code of backup/restore aborting due to incompatible backup
Diffstat (limited to 'tools')
-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[])
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;
}
}