* ConsoleRunner:

- Fix webapps file path
    * SusiDNS:
      - Fix addressbook file path
    * Systray:
      - Fix NPE if no config file
      - Fix config file path
    * WorkingDir:
      - Modify clients.config so jetty can find the jetty.xml file
      - Rip out all the existing-installation migration code
      - Rip out migration code now done by izpack parsable
      - Fix copy of empty directories
This commit is contained in:
zzz
2009-06-13 23:47:08 +00:00
parent 24daf00616
commit e5ec72b09b
5 changed files with 53 additions and 218 deletions

View File

@ -74,6 +74,19 @@ public class RouterConsoleRunner {
props.setProperty(PREFIX + ROUTERCONSOLE + ENABLED, "true");
rewrite = true;
}
// Get an absolute path with a trailing slash for the webapps dir
// We assume relative to the base install dir for backward compatibility
File app = new File(_webAppsDir);
if (!app.isAbsolute()) {
app = new File(I2PAppContext.getGlobalContext().getBaseDir(), _webAppsDir);
try {
_webAppsDir = app.getCanonicalPath();
} catch (IOException ioe) {}
}
if (!_webAppsDir.endsWith("/"))
_webAppsDir += '/';
try {
StringTokenizer tok = new StringTokenizer(_listenHost, " ,");
int boundAddresses = 0;
@ -99,7 +112,7 @@ public class RouterConsoleRunner {
tmpdir.mkdir();
wac.setTempDirectory(tmpdir);
initialize(wac);
File dir = new File(I2PAppContext.getGlobalContext().getBaseDir(), _webAppsDir);
File dir = new File(_webAppsDir);
String fileNames[] = dir.list(WarFilenameFilter.instance());
if (fileNames != null) {
for (int i = 0; i < fileNames.length; i++) {