Account for cancelling an update process

Posted by Aerus on Stack Overflow See other posts from Stack Overflow or by Aerus
Published on 2012-09-08T15:34:14Z Indexed on 2012/09/08 15:37 UTC
Read the original article Hit count: 184

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about application

Related posts about updating