Account for cancelling an update process
- by Aerus
I'm trying to develop the logic of updating my (Java) application but I'm stuck on a particular problem.
The user can, at any time, be it on purpose (by clicking the Cancel button) or unwillingly (system/power failure) cancel the update process.
If the updater was busy downloading files or unpacking files and thus didn't make any changes to the main application yet, this can be easily recovered by re-downloading the files and continuing the update process like normally.
But, how can i account for changes made to the main application (i.e. a file was only partially replaced, some files were corrupted, etc.) that result in a main application that can't be launched anymore?
Is it possible to rollback the changes made during the update without having to keep a full backup of my application or without doing a full reinstall?
Are there any standards for updating an application that can help me with this?