aboutsummaryrefslogtreecommitdiff
path: root/src/installer
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2010-07-24 23:12:55 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2010-07-24 23:12:55 +0200
commitf89dbe5d0e505cc6e05a9bbb389d8303333ef4e0 (patch)
tree41d951d6d77850948926249d0f17822d340a2520 /src/installer
parentf9d82911dc9a081ff09cfe7fa4f24ec6dc850bfc (diff)
downloadlombok-f89dbe5d0e505cc6e05a9bbb389d8303333ef4e0.tar.gz
lombok-f89dbe5d0e505cc6e05a9bbb389d8303333ef4e0.tar.bz2
lombok-f89dbe5d0e505cc6e05a9bbb389d8303333ef4e0.zip
Uninstalling lombok from netbeans was broken in the previous installer update.
Diffstat (limited to 'src/installer')
-rw-r--r--src/installer/lombok/installer/netbeans/NetbeansLocation.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/installer/lombok/installer/netbeans/NetbeansLocation.java b/src/installer/lombok/installer/netbeans/NetbeansLocation.java
index f4da8f3f..7ef5f1c8 100644
--- a/src/installer/lombok/installer/netbeans/NetbeansLocation.java
+++ b/src/installer/lombok/installer/netbeans/NetbeansLocation.java
@@ -156,11 +156,13 @@ public class NetbeansLocation extends IdeLocation {
File lombokJar = new File(dir, "lombok.jar");
if (lombokJar.exists()) {
- if (IdeFinder.getOS() == IdeFinder.OS.WINDOWS && Installer.isSelf(lombokJar.getAbsolutePath())) {
- lombokJarsForWhichCantDeleteSelf.add(lombokJar);
- } else {
- throw new UninstallException(
- "Can't delete " + lombokJar.getAbsolutePath() + generateWriteErrorMessage(), null);
+ if (!lombokJar.delete()) {
+ if (IdeFinder.getOS() == IdeFinder.OS.WINDOWS && Installer.isSelf(lombokJar.getAbsolutePath())) {
+ lombokJarsForWhichCantDeleteSelf.add(lombokJar);
+ } else {
+ throw new UninstallException(
+ "Can't delete " + lombokJar.getAbsolutePath() + generateWriteErrorMessage(), null);
+ }
}
}