Details
Description
QT Updater deletes old component versions before downloading the new ones. If it fails during a later delete, or during download, knowledge of the deleted components is lost. They must then be re-installed by hand, but the user has no list of what has gone missing.
A better order of operation would be:
0. Compute what needs to be updated, just as is done now.
1. Perform all necessary downloads (skipping ones that have already been obtained if a failed download caused the tool to exit).
2. Delete any "dangling" downloads in the download directory that have been superseded by later download versions.
3. Now delete the old versions of the components (i.e. the ones being replaced).
4. Finally, install any package files in the download directory.
Note that step [4] should be done even if step [0] concludes that no updates are required. This provides recovery if one of the delete phases fails.
While I'm at it: the delete phase should NOT complain - and certainly should not fail - if an attempt to delete a file fails because the file has already been deleted.