installer: extra checks & add to findbugs target

This commit is contained in:
kytv
2012-12-31 18:00:42 +00:00
parent a40566eefb
commit 44498ca8c7
3 changed files with 20 additions and 12 deletions

View File

@@ -82,13 +82,19 @@ public class FixWinPaths{
//
}
}
// Once everything is complete, delete the original wrapper.conf
boolean successful = false;
File oldFile = new File(wConf);
oldFile.delete();
// ...and rename temp file's name to wrapper.conf
File newFile = new File(wConfTemp);
newFile.renameTo(oldFile);
// Once changes have been made, delete the original wrapper.conf
successful = oldFile.delete();
if (successful) {
// ...and rename temp file's name to wrapper.conf
successful = newFile.renameTo(oldFile);
if (!successful) {
System.err.println("ERROR: Problem processing " + wConf);
System.exit(1);
}
}
}
}