Boards manager: when upgrading, first remove, then install

This commit is contained in:
Federico Fissore 2015-11-24 10:54:29 +01:00
parent 7dd6e8f57d
commit 4f3415279c
1 changed files with 1 additions and 1 deletions

View File

@ -161,10 +161,10 @@ public class ContributionManagerUI extends InstallerJDialog {
List<String> errors = new LinkedList<>(); List<String> errors = new LinkedList<>();
try { try {
setProgressVisible(true, tr("Installing...")); setProgressVisible(true, tr("Installing..."));
errors.addAll(installer.install(platformToInstall, this::setProgress));
if (platformToRemove != null && !platformToRemove.isReadOnly()) { if (platformToRemove != null && !platformToRemove.isReadOnly()) {
errors.addAll(installer.remove(platformToRemove)); errors.addAll(installer.remove(platformToRemove));
} }
errors.addAll(installer.install(platformToInstall, this::setProgress));
onIndexesUpdated(); onIndexesUpdated();
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);